From: Pali Rohár Date: Wed, 12 Jan 2022 17:20:54 +0000 (+0100) Subject: tools: kwbimage: Fix mkimage/dumpimage -l argument X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=32860b00bf2cb441c5b9b396d41c84aac340d7ad;p=u-boot.git tools: kwbimage: Fix mkimage/dumpimage -l argument 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 Reviewed-by: Marek Behún Reviewed-by: Stefan Roese --- diff --git a/tools/kwbimage.c b/tools/kwbimage.c index d159087d9d..9b63ce80ff 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -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);