]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: mkimage: don't print error message "Success" in case of failure
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 23 Nov 2022 11:55:32 +0000 (12:55 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 8 Dec 2022 14:29:02 +0000 (09:29 -0500)
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>
tools/mkimage.c

index 0b5ee5da1eed4f491951ddac231e4685ccf36813..8306861ce5151f25a9675b0f629382b8216cc8ba 100644 (file)
@@ -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);
        }