diff options
author | Simon Glass <sjg@chromium.org> | 2023-11-29 10:31:19 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-12-20 10:46:54 -0500 |
commit | 921f63e5723880bbbaf65429564e5638b7bbd002 (patch) | |
tree | f8738614700e43d3d3922b3e41c15c5f5426bb17 /cmd | |
parent | 7481632b192f61b5bcb028c885a460d8b9c2731c (diff) |
bootflow: Allow setting a cmdline arg with no value
This is supposed to be supported by the 'bootflow cmd' command, at
least according to the help. There is a 'bootflow cmd clear' but it is
often more intuitive to use 'bootcmd cmd set' with an empty value.
Update the command to pass BOOTFLOWCL_EMPTY in this case.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/bootflow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/bootflow.c b/cmd/bootflow.c index 4a47265ebd..cc6dfae166 100644 --- a/cmd/bootflow.c +++ b/cmd/bootflow.c @@ -543,9 +543,9 @@ static int do_bootflow_cmdline(struct cmd_tbl *cmdtp, int flag, int argc, op = argv[1]; arg = argv[2]; if (*op == 's') { - if (argc < 4) + if (argc < 3) return CMD_RET_USAGE; - val = argv[3]; + val = argv[3] ?: (const char *)BOOTFLOWCL_EMPTY; } switch (*op) { |