diff options
author | Simon Glass <sjg@chromium.org> | 2023-11-18 14:05:20 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-12-13 11:51:24 -0500 |
commit | 8632b36b96d38a85f2e71603a6f90ec9e4e5e37e (patch) | |
tree | 90955cdb3d121e37567fe4226f9862566220af57 /cmd/bootz.c | |
parent | 1047b5340c1203f825c0a68b33997b787be0123e (diff) |
command: Introduce functions to obtain command arguments
Add some functions which provide an argument to a command, or NULL if
the argument does not exist.
Use the same numbering as argv[] since it seems less confusing than the
previous idea.
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'cmd/bootz.c')
-rw-r--r-- | cmd/bootz.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/bootz.c b/cmd/bootz.c index bcf232b4f30..a652879ea5e 100644 --- a/cmd/bootz.c +++ b/cmd/bootz.c @@ -54,8 +54,8 @@ static int bootz_start(struct cmd_tbl *cmdtp, int flag, int argc, * Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not * have a header that provide this informaiton. */ - if (bootm_find_images(image_load_addr, argc > 1 ? argv[1] : NULL, - argc > 2 ? argv[2] : NULL, images->ep, + if (bootm_find_images(image_load_addr, cmd_arg1(argc, argv), + cmd_arg2(argc, argv), images->ep, zi_end - zi_start)) return 1; |