Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7F861FA3741 for ; Mon, 31 Oct 2022 14:51:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 55D778534B; Mon, 31 Oct 2022 15:51:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=pengutronix.de 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 77739851B5; Mon, 31 Oct 2022 15:51:29 +0100 (CET) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2E67C8531A for ; Mon, 31 Oct 2022 15:51:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mkl@pengutronix.de Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1opW8M-0003Iq-Q0 for u-boot@lists.denx.de; Mon, 31 Oct 2022 15:51:26 +0100 Received: from dspam.blackshift.org (localhost [127.0.0.1]) by bjornoya.blackshift.org (Postfix) with SMTP id 342F810F33F for ; Mon, 31 Oct 2022 14:51:26 +0000 (UTC) Received: from hardanger.blackshift.org (unknown [172.20.34.65]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by bjornoya.blackshift.org (Postfix) with ESMTPS id 00B5310F33C; Mon, 31 Oct 2022 14:51:26 +0000 (UTC) Received: from blackshift.org (localhost [::1]) by hardanger.blackshift.org (OpenSMTPD) with ESMTP id 8b742f54; Mon, 31 Oct 2022 14:51:25 +0000 (UTC) From: Marc Kleine-Budde To: u-boot@lists.denx.de Cc: embedded@vivavis.com, Marc Kleine-Budde Subject: [PATCH v2 1/2] tools: mkimage: don't print error message "Success" in case of failure Date: Mon, 31 Oct 2022 15:51:20 +0100 Message-Id: <20221031145121.236877-2-mkl@pengutronix.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221031145121.236877-1-mkl@pengutronix.de> References: <20221031145121.236877-1-mkl@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: u-boot@lists.denx.de X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean In case there's no struct image_type_params::set_header callback, no "errno" will be set. Don't fail with an error message, followed by "Success". Remove the printing of the human readable "errno" value. Signed-off-by: Marc Kleine-Budde --- tools/mkimage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/mkimage.c b/tools/mkimage.c index 30c6df77081f..35a6b1fb799c 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -760,8 +760,8 @@ int main(int argc, char **argv) if (tparams->set_header) tparams->set_header (ptr, &sbuf, ifd, ¶ms); else { - fprintf (stderr, "%s: Can't set header for %s: %s\n", - params.cmdname, tparams->name, strerror(errno)); + fprintf (stderr, "%s: Can't set header for %s\n", + params.cmdname, tparams->name); exit (EXIT_FAILURE); } -- 2.35.1