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>
This commit is contained in:
Marc Kleine-Budde 2022-11-23 12:55:32 +01:00 committed by Tom Rini
parent 4b95e8407e
commit 72c3f5dbd9

View File

@ -765,8 +765,8 @@ int main(int argc, char **argv)
if (tparams->set_header) if (tparams->set_header)
tparams->set_header (ptr, &sbuf, ifd, &params); tparams->set_header (ptr, &sbuf, ifd, &params);
else { else {
fprintf (stderr, "%s: Can't set header for %s: %s\n", fprintf (stderr, "%s: Can't set header for %s\n",
params.cmdname, tparams->name, strerror(errno)); params.cmdname, tparams->name);
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }