[PATCH v3 1/2] tools: mkimage: don't print error message "Success" in case of failure
Marc Kleine-Budde
mkl at pengutronix.de
Wed Nov 23 12:55:32 CET 2022
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 at pengutronix.de>
---
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
More information about the U-Boot
mailing list