summaryrefslogtreecommitdiff
path: root/cmd/mmc.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-11-18 14:05:20 -0700
committerTom Rini <trini@konsulko.com>2023-12-13 11:51:24 -0500
commit8632b36b96d38a85f2e71603a6f90ec9e4e5e37e (patch)
tree90955cdb3d121e37567fe4226f9862566220af57 /cmd/mmc.c
parent1047b5340c1203f825c0a68b33997b787be0123e (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/mmc.c')
-rw-r--r--cmd/mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 96befb27eec..2d5430a5307 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -946,7 +946,7 @@ static int do_mmc_partconf(struct cmd_tbl *cmdtp, int flag,
}
if (argc == 2 || argc == 3)
- return mmc_partconf_print(mmc, argc == 3 ? argv[2] : NULL);
+ return mmc_partconf_print(mmc, cmd_arg2(argc, argv));
ack = dectoul(argv[2], NULL);
part_num = dectoul(argv[3], NULL);