From 19a81bdb3ecb4c7dae6794bbee3a1fd4327b6a67 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Fri, 23 Jul 2021 11:14:16 +0200 Subject: tools: dumpimage: Show error message when trying to extract data from kwbimage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Marek Behún Reviewed-by: Stefan Roese --- tools/kwbimage.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools') diff --git a/tools/kwbimage.c b/tools/kwbimage.c index 5410df63f5..9ecda861e4 100644 --- a/tools/kwbimage.c +++ b/tools/kwbimage.c @@ -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"; -- cgit v1.2.3