From patchwork Tue Jan 21 10:58:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?S=C3=A9bastien_Szymanski?= X-Patchwork-Id: 1226375 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=armadeus.com Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4825CM1xyyz9sPJ for ; Tue, 21 Jan 2020 21:59:39 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CE01D81961; Tue, 21 Jan 2020 11:59:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=armadeus.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 2FFFB81967; Tue, 21 Jan 2020 11:59:31 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from 5.mo1.mail-out.ovh.net (5.mo1.mail-out.ovh.net [178.33.45.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1B5AF8194B for ; Tue, 21 Jan 2020 11:59:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=armadeus.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sebastien.szymanski@armadeus.com Received: from player734.ha.ovh.net (unknown [10.108.1.146]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 647D71A8B13 for ; Tue, 21 Jan 2020 11:59:27 +0100 (CET) Received: from armadeus.com (lfbn-str-1-12-36.w92-140.abo.wanadoo.fr [92.140.139.36]) (Authenticated sender: sebastien.szymanski@armadeus.com) by player734.ha.ovh.net (Postfix) with ESMTPSA id 93B6AE51A8E8; Tue, 21 Jan 2020 10:59:22 +0000 (UTC) From: =?utf-8?q?S=C3=A9bastien_Szymanski?= To: u-boot@lists.denx.de, Stefano Babic , Fabio Estevam , Peng Fan Subject: [PATCH 1/1] tools: imx8m_image: fix warning message Date: Tue, 21 Jan 2020 11:58:42 +0100 Message-Id: <20200121105842.23965-1-sebastien.szymanski@armadeus.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-Ovh-Tracer-Id: 15676748828646265881 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrudekgddvudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkofggtgfgsehtkeertdertdejnecuhfhrohhmpefurogsrghsthhivghnucfuiiihmhgrnhhskhhiuceoshgvsggrshhtihgvnhdrshiihihmrghnshhkihesrghrmhgruggvuhhsrdgtohhmqeenucfkpheptddrtddrtddrtddpledvrddugedtrddufeelrdefieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhejfeegrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshgvsggrshhtihgvnhdrshiihihmrghnshhkihesrghrmhgruggvuhhsrdgtohhmpdhrtghpthhtohepuhdqsghoohhtsehlihhsthhsrdguvghngidruggv X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean When a firmware file is missing the warning message doesn't indicate the firmware file name because '$tmp' var doesn't exist. Fix the warning message and while at it reduce the if/else statement. Signed-off-by: Sébastien Szymanski Reviewed-by: Frieder Schrempf --- tools/imx8m_image.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/imx8m_image.sh b/tools/imx8m_image.sh index 4959f9c835..ba60104443 100755 --- a/tools/imx8m_image.sh +++ b/tools/imx8m_image.sh @@ -14,10 +14,8 @@ for f in $blobs; do continue fi - if [ -f $f ]; then - continue - else - echo "WARNING '$tmp' not found, resulting binary is not-functional" >&2 + if [ ! -f $f ]; then + echo "WARNING '$f' not found, resulting binary is not-functional" >&2 exit 1 fi done