aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@cherry.de>2024-06-06 13:44:04 +0200
committerKever Yang <kever.yang@rock-chips.com>2024-06-14 17:07:59 +0800
commit3f9a19befe9277db2a337552912c6ddbcc0c8b10 (patch)
tree2fe859cb8e262a50fc384ac04be3ce628c02c1fd
parentc924f7efbb4fe6c57b63cb74130a9c14db5a3f8d (diff)
downloadu-boot-3f9a19befe9277db2a337552912c6ddbcc0c8b10.zip
u-boot-3f9a19befe9277db2a337552912c6ddbcc0c8b10.tar.gz
u-boot-3f9a19befe9277db2a337552912c6ddbcc0c8b10.tar.bz2
rockchip: mkimage: fix mkimage -l for header v1
There are two paths to reach this function, either through mkimage -l or through dumpimage -l. The latter passes a NULL imagename while the former passes an empty string. Therefore, let's make both tools behave the same by handling the empty string the same way as for NULL. Without this, the only way to get some information out of mkimage -l is to provide "-n rk3399" for example, which isn't documented in the usage of the tool. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
-rw-r--r--tools/rkcommon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/rkcommon.c b/tools/rkcommon.c
index 12c27b3..3e52236 100644
--- a/tools/rkcommon.c
+++ b/tools/rkcommon.c
@@ -470,7 +470,7 @@ int rkcommon_verify_header(unsigned char *buf, int size,
* If no 'imagename' is specified via the commandline (e.g. if this is
* 'dumpimage -l' w/o any further constraints), we accept any spl_info.
*/
- if (params->imagename == NULL)
+ if (params->imagename == NULL || !strlen(params->imagename))
return 0;
/* Match the 'imagename' against the 'spl_hdr' found */