diff options
-rw-r--r-- | cmd/bootflow.c | 4 | ||||
-rw-r--r-- | test/boot/bootflow.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/cmd/bootflow.c b/cmd/bootflow.c index 4a47265..cc6dfae 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) { diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c index f3e5a83..a9b555c 100644 --- a/test/boot/bootflow.c +++ b/test/boot/bootflow.c @@ -1095,6 +1095,10 @@ static int bootflow_cmdline(struct unit_test_state *uts) ut_asserteq(0, run_command("bootflow cmdline get mary", 0)); ut_assert_nextline_empty(); + ut_asserteq(0, run_command("bootflow cmdline set mary abc", 0)); + ut_asserteq(0, run_command("bootflow cmdline set mary", 0)); + ut_assert_nextline_empty(); + ut_assert_console_end(); return 0; |