On Sat, Nov 11, 2023 at 05:08:55PM -0700, Simon Glass wrote:

> This function only uses one argument and just needs to know the name of
> the command which called it. Adjust the function to use only what it
> needs. This will make it easier to call from a non-command context.
> 
> Tidy up the function comment while we are here.
> 
> Signed-off-by: Simon Glass <[email protected]>
[snip]
> @@ -312,8 +316,8 @@ static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, 
> int argc,
>       int ret;
>  
>       /* get kernel image header, start address and length */
> -     os_hdr = boot_get_kernel(cmdtp, flag, argc, argv,
> -                     &images, &images.os.image_start, &images.os.image_len);
> +     os_hdr = boot_get_kernel("bootm", argv[0], &images,
> +                              &images.os.image_start, &images.os.image_len);

Shouldn't this be cmdtp->name not "bootm" ? The eventual use case is
reporting back to the user that what they tried to use with
bootm/booti/bootz isn't a match.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to