[PATCH u-boot-mvebu v2 22/41] tools: dumpimage: Show error message when trying to extract data from kwbimage

Stefan Roese sr at denx.de
Wed Jul 21 11:39:51 CEST 2021


On 19.07.21 14:20, Marek Behún wrote:
> From: Pali Rohár <pali at kernel.org>
> 
> 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 at kernel.org>
> Reviewed-by: Marek Behún <marek.behun at nic.cz>

Reviewed-by: Stefan Roese <sr at denx.de>

Thanks,
Stefan

> ---
>   tools/kwbimage.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> 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";
>   
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr at denx.de


More information about the U-Boot mailing list