[PATCH 27/29] bootm: Adjust the parameters of bootm_find_images()
Tom Rini
trini at konsulko.com
Wed Nov 15 23:38:00 CET 2023
On Sat, Nov 11, 2023 at 05:09:12PM -0700, Simon Glass wrote:
> Rather than passing it all the command-line args, pass in the pieces
> that it needs. These are the image address, the ramdisk address/name
> and the FDT address/name.
>
> Ultimately this will allow usage of this function without being called
> from the command line.
OK, so this goal is good.
[snip]
> + return bootm_find_images(img_addr, argc > 1 ? argv[1] : NULL,
> + argc > 2 ? argv[2] : NULL, 0, 0);
That we repeat this much harder to read test/if/else three times now is
less good. Can we find some way to hide the complexity here in the case
where it's coming from a command and so we have argc/argv[] ?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231115/4634a69b/attachment.sig>
More information about the U-Boot
mailing list