diff options
| author | Pali Rohár <[email protected]> | 2022-01-12 18:20:54 +0100 |
|---|---|---|
| committer | Stefan Roese <[email protected]> | 2022-01-14 11:39:16 +0100 |
| commit | 32860b00bf2cb441c5b9b396d41c84aac340d7ad (patch) | |
| tree | 8c08387209c219db561bae32e585871b0b85b865 | |
| parent | 1972c7e30859b48326e41e56a7fddfac1a6f5739 (diff) | |
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 <[email protected]>
Reviewed-by: Marek Behún <[email protected]>
Reviewed-by: Stefan Roese <[email protected]>
| -rw-r--r-- | tools/kwbimage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/kwbimage.c b/tools/kwbimage.c index d159087d9dd..9b63ce80ff4 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); |
