[PATCH 1/4] cmd: dtimg: Report invalid index argument
    Sam Protsenko 
    semen.protsenko at linaro.org
       
    Wed Dec  4 16:46:52 CET 2019
    
    
  
Hi,
On Fri, Nov 29, 2019 at 9:30 PM Eugeniu Rosca <erosca at de.adit-jv.com> wrote:
>
> Being user-friendly is paramount to make any product likeable and
> easy to use. Hence, instead of [1], print [2].
>
> [1] dtimg start 0x48000000 not-a-number myvar
> Error: Wrong index
>
> [2] dtimg start 0x48000000 not-a-number myvar
> Error: Wrong index 'not-a-number'
>
> Signed-off-by: Eugeniu Rosca <erosca at de.adit-jv.com>
> ---
Reviewed-by: Sam Protsenko <semen.protsenko at linaro.org>
>  cmd/dtimg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmd/dtimg.c b/cmd/dtimg.c
> index 6c5d53cc6808..2317c859953d 100644
> --- a/cmd/dtimg.c
> +++ b/cmd/dtimg.c
> @@ -63,7 +63,7 @@ static int dtimg_get_fdt(int argc, char * const argv[], enum cmd_dtimg_info cmd)
>
>         index = simple_strtoul(argv[2], &endp, 0);
>         if (*endp != '\0') {
> -               printf("Error: Wrong index\n");
> +               printf("Error: Wrong index '%s'\n", argv[2]);
>                 return CMD_RET_FAILURE;
>         }
>
> --
> 2.24.0
>
    
    
More information about the U-Boot
mailing list