From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from gallifrey.ext.pengutronix.de ([2001:6f8:1178:4:5054:ff:fe8d:eefb] helo=bjornoya.do.blackshift.org) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1X4VTk-0005wA-W8 for ptxdist@pengutronix.de; Tue, 08 Jul 2014 15:30:41 +0200 Received: from [IPv6:2001:6f8:105b:1122:5e51:4fff:fed6:c770] (unknown [IPv6:2001:6f8:105b:1122:5e51:4fff:fed6:c770]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: frogger) by bjornoya.do.blackshift.org (Postfix) with ESMTPSA id B22C962326 for ; Tue, 8 Jul 2014 15:30:40 +0200 (CEST) Message-ID: <53BBF27D.50005@pengutronix.de> Date: Tue, 08 Jul 2014 15:30:37 +0200 From: Marc Kleine-Budde MIME-Version: 1.0 References: <1404824365-7638-1-git-send-email-alex.aring@gmail.com> <1404824365-7638-2-git-send-email-alex.aring@gmail.com> <53BBF08A.1050802@pengutronix.de> <20140708132434.GA28466@omega> In-Reply-To: <20140708132434.GA28466@omega> Subject: Re: [ptxdist] [RFC] ptxd_make_dts_dtb: check on failure if dtc failed Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0861308761==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============0861308761== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CHwhOHNVb4fdArABaeqfmBnBc5wV25uJH" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CHwhOHNVb4fdArABaeqfmBnBc5wV25uJH Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 >>> --- >>> 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}" >>> =20 >>> + if [ "$?" !=3D "0" ]; then >>> + ptxd_bailout "Unable to generate ${dts_dtb} file." >>> + fi >> >> What about: >> >> || ptxd_bailout "Unable to generate ${dts_dtb} file." >> >=20 > okay, yes then we could save the if. I can also add >=20 > || ptxd_bailout ... for cpp call. Or better concatenate everything with a && and add || bailout at the end.= Marc --=20 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 | --CHwhOHNVb4fdArABaeqfmBnBc5wV25uJH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iEYEARECAAYFAlO78n0ACgkQjTAFq1RaXHP5PQCffyhGEvnWNt3O/M/yFQGJGFe5 dgkAn1sgSyl/dCqgtb0fbbsfwvZbEM9I =Nxs3 -----END PGP SIGNATURE----- --CHwhOHNVb4fdArABaeqfmBnBc5wV25uJH-- --===============0861308761== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============0861308761==--