]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
tools: dumpimage: Show error message when trying to extract data from kwbimage
authorPali Rohár <pali@kernel.org>
Fri, 23 Jul 2021 09:14:16 +0000 (11:14 +0200)
committerStefan Roese <sr@denx.de>
Sat, 31 Jul 2021 07:49:31 +0000 (09:49 +0200)
There is no code for extracting data from kwbimage, so show an error
message when user tries this via e.g. dumpimage call:
  ./tools/dumpimage -T kwbimage -o /tmp/out u-boot-spl.kwb

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 5410df63f5399239aec8b413f06a9ab2ada4acd3..9ecda861e4f828bb8c73d258c8ef4d559b03e16f 100644 (file)
@@ -1867,6 +1867,11 @@ static int kwbimage_generate(struct image_tool_params *params,
  */
 static int kwbimage_check_params(struct image_tool_params *params)
 {
+       if (params->iflag) {
+               fprintf(stderr, "%s: kwbimage does not support extract operation\n", params->cmdname);
+               return CFG_INVALID;
+       }
+
        if (!params->imagename || !strlen(params->imagename)) {
                char *msg = "Configuration file for kwbimage creation omitted";