mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [RFC] ptxd_make_dts_dtb: check on failure if dtc failed
Date: Tue, 08 Jul 2014 15:30:37 +0200	[thread overview]
Message-ID: <53BBF27D.50005@pengutronix.de> (raw)
In-Reply-To: <20140708132434.GA28466@omega>


[-- Attachment #1.1: Type: text/plain, Size: 1416 bytes --]

On 07/08/2014 03:24 PM, Alexander Aring wrote:
> On Tue, Jul 08, 2014 at 03:22:18PM +0200, Marc Kleine-Budde wrote:
>> On 07/08/2014 02:59 PM, Alexander Aring wrote:
>>> This patch adds a error handling for the dtc and call a ptxd_bailout if
>>> an error occur.
>>>
>>> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
>>> ---
>>>  scripts/lib/ptxd_make_dts_dtc.sh | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/scripts/lib/ptxd_make_dts_dtc.sh b/scripts/lib/ptxd_make_dts_dtc.sh
>>> index 24c5604..6a09cae 100644
>>> --- a/scripts/lib/ptxd_make_dts_dtc.sh
>>> +++ b/scripts/lib/ptxd_make_dts_dtc.sh
>>> @@ -59,6 +59,10 @@ ptxd_make_dts_dtb() {
>>>  	-I dts -O dtb -b 0 \
>>>  	-o "${dts_dtb}" "${tmp_dts}"
>>>  
>>> +    if [ "$?" != "0" ]; then
>>> +	ptxd_bailout "Unable to generate ${dts_dtb} file."
>>> +    fi
>>
>> What about:
>>
>>     || ptxd_bailout "Unable to generate ${dts_dtb} file."
>>
> 
> okay, yes then we could save the if. I can also add
> 
> 	|| ptxd_bailout ... for cpp call.

Or better concatenate everything with a && and add || bailout at the end.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 242 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2014-07-08 13:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 12:59 [ptxdist] [RFC] ptxd_make_dts_dtb: error handling Alexander Aring
2014-07-08 12:59 ` [ptxdist] [RFC] ptxd_make_dts_dtb: check on failure if dtc failed Alexander Aring
2014-07-08 13:22   ` Marc Kleine-Budde
2014-07-08 13:24     ` Alexander Aring
2014-07-08 13:30       ` Marc Kleine-Budde [this message]
2014-07-08 13:46         ` Alexander Aring
2014-07-08 14:07           ` Marc Kleine-Budde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53BBF27D.50005@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox