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/fuse.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/fuse.c')
-rw-r--r-- | cmd/fuse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/fuse.c b/cmd/fuse.c index 0676bb7a81..f884c894fb 100644 --- a/cmd/fuse.c +++ b/cmd/fuse.c @@ -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; |