From: Guillaume GARDET Date: Fri, 30 Mar 2018 08:28:19 +0000 (+0200) Subject: mkimage: do not fail if there is no print_header function X-Git-Tag: v2018.05-rc2~39 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=004d00914a1888a050ef2d30e52e8e3862983ccb;p=u-boot mkimage: do not fail if there is no print_header function Commit 253c60a breaks the exit value of 'mkimage -T rkimage' and print the following error: mkimage: Can't print header for Rockchip Boot Image support: Success It is not a failure to not print headers, so just display the warning message, and finish the function properly. Signed-off-by: Guillaume GARDET Cc: Philipp Tomsich Cc: Simon Glass Cc: Tom Rini Reviewed-by: Philipp Tomsich --- diff --git a/tools/mkimage.c b/tools/mkimage.c index 28ff35e670..4e561820e7 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -588,9 +588,8 @@ int main(int argc, char **argv) if (tparams->print_header) tparams->print_header (ptr); else { - fprintf (stderr, "%s: Can't print header for %s: %s\n", - params.cmdname, tparams->name, strerror(errno)); - exit (EXIT_FAILURE); + fprintf (stderr, "%s: Can't print header for %s\n", + params.cmdname, tparams->name); } (void) munmap((void *)ptr, sbuf.st_size);