]> git.baikalelectronics.ru Git - uboot.git/commit
tools: mkimage: Print human readable error when -d is not specified
authorPali Rohár <pali@kernel.org>
Sun, 8 Jan 2023 22:28:39 +0000 (23:28 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Mar 2023 05:39:17 +0000 (06:39 +0100)
commit8cd3227818877cd040f7e89c7cb10a083a2f1672
treec714974d2696e549c0cb5d762cf9f1b3144d9f08
parent2d4b7396255c11b32cef4d1f0337788c030ac246
tools: mkimage: Print human readable error when -d is not specified

When asking mkimage to create a new image file and option -d is not
specified then mkimage show human unfriendly error message:

  mkimage: Can't open (null): Bad address

Without debugger it is hard to debug what is the issue. Function open() is
being called with file name set to NULL. So add a check for this and if it
happens then show human readable message that option -d was not specified.

Signed-off-by: Pali Rohár <pali@kernel.org>
tools/mkimage.c