提交 004d0091 编写于 作者: G Guillaume GARDET 提交者: Tom Rini

mkimage: do not fail if there is no print_header function

Commit 253c60a5 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: NGuillaume GARDET <guillaume.gardet@free.fr>

Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: NPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
上级 d409c962
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册