mirror of
https://xff.cz/git/u-boot/
synced 2025-09-25 12:31:17 +02:00
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>
This commit is contained in:
@@ -44,7 +44,7 @@ static int confirm_prog(void)
|
||||
static int do_fuse(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
const char *op = argc >= 2 ? argv[1] : NULL;
|
||||
const char *op = cmd_arg1(argc, argv);
|
||||
int confirmed = argc >= 3 && !strcmp(argv[2], "-y");
|
||||
u32 bank, word, cnt, val, cmp;
|
||||
ulong addr;
|
||||
|
Reference in New Issue
Block a user