]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: kwbimage: Fix mkimage/dumpimage -l argument
authorPali Rohár <pali@kernel.org>
Wed, 12 Jan 2022 17:20:54 +0000 (18:20 +0100)
committerStefan Roese <sr@denx.de>
Fri, 14 Jan 2022 10:39:16 +0000 (11:39 +0100)
Do not check for kwbimage configuration file when just showing information
about existing kwbimage file.

The check for kwbimage configuration file is required only when creating
kwbimage, not when showing information about image or when extracting data
from image.

With this change, it is possible to call mkimage -l and dumpimage -l also
for existing kwbimage file.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
tools/kwbimage.c

index d159087d9dd65f982e8657a10f8e6579cb240ee3..9b63ce80ff4e42bd14239a56ff1a7fb017be2a79 100644 (file)
@@ -2331,7 +2331,8 @@ static int kwbimage_extract_subimage(void *ptr, struct image_tool_params *params
  */
 static int kwbimage_check_params(struct image_tool_params *params)
 {
-       if (!params->iflag && (!params->imagename || !strlen(params->imagename))) {
+       if (!params->lflag && !params->iflag &&
+           (!params->imagename || !strlen(params->imagename))) {
                char *msg = "Configuration file for kwbimage creation omitted";
 
                fprintf(stderr, "Error:%s - %s\n", params->cmdname, msg);