From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: Wed, 23 Nov 2022 11:55:32 +0000 (+0100)
Subject: tools: mkimage: don't print error message "Success" in case of failure
X-Git-Tag: v2025.01-rc5-pxa1908~1158^2~11^2~5
X-Git-Url: http://git.dujemihanovic.xyz/img/html/static/git-favicon.png?a=commitdiff_plain;h=72c3f5dbd9545259a7eb04a7d21dff9b318de77e;p=u-boot.git

tools: mkimage: don't print error message "Success" in case of failure

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 <mkl@pengutronix.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

diff --git a/tools/mkimage.c b/tools/mkimage.c
index 0b5ee5da1e..8306861ce5 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -765,8 +765,8 @@ int main(int argc, char **argv)
 	if (tparams->set_header)
 		tparams->set_header (ptr, &sbuf, ifd, &params);
 	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);
 	}