Update this command to use a -c flag rather than a special 'clear' argument.
Link: https://patchwork.ozlabs.org/project/uboot/patch/20250501133726.2627373-16-...@chromium.org/ Signed-off-by: Simon Glass <s...@chromium.org> Suggested-by: Quentin Schulz <quentin.sch...@cherry.de> --- cmd/bootdev.c | 4 ++-- doc/usage/cmd/bootdev.rst | 10 +++++----- test/boot/bootdev.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/bootdev.c b/cmd/bootdev.c index f05a865f609..8ed2c96e50a 100644 --- a/cmd/bootdev.c +++ b/cmd/bootdev.c @@ -148,7 +148,7 @@ static int do_bootdev_order(struct cmd_tbl *cmdtp, int flag, int argc, if (ret) return ret; if (argc == 2) { - if (!strncmp(argv[1], "clear", strlen(argv[1]))) { + if (!strcmp(argv[1], "-c")) { bootdev_set_order(NULL); return 0; @@ -176,7 +176,7 @@ static int do_bootdev_order(struct cmd_tbl *cmdtp, int flag, int argc, U_BOOT_LONGHELP(bootdev, "list [-p] - list all available bootdevs (-p to probe)\n" "bootdev hunt [-l|<spec>] - use hunt drivers to find bootdevs\n" - "bootdev order [clear] | [<spec>,...] - view or update bootdev order\n" + "bootdev order [-c] | [<spec>,...] - view or update bootdev order\n" "bootdev select <bd> - select a bootdev by name | label | seq\n" "bootdev info [-p] - show information about a bootdev (-p to probe)"); diff --git a/doc/usage/cmd/bootdev.rst b/doc/usage/cmd/bootdev.rst index abede194cba..76e56c26f21 100644 --- a/doc/usage/cmd/bootdev.rst +++ b/doc/usage/cmd/bootdev.rst @@ -13,7 +13,7 @@ Synopsis bootdev list [-p] - list all available bootdevs (-p to probe) bootdev hunt [-l|<spec>] - use hunt drivers to find bootdevs - bootdev order [clear] | [<spec> ...] - view or update bootdev order + bootdev order [-c] | [<spec> ...] - view or update bootdev order bootdev select <bm> - select a bootdev by name bootdev info [-p] - show information about a bootdev @@ -85,11 +85,11 @@ bootdev order This allows the bootdev order to be examined or set. With no argument the current ordering is shown, one item per line. -The argument can either be 'clear' or a space-separated list of labels. Each -label can be the name of a bootdev (e.g. "mmc1.bootdev"), a bootdev sequence -number ("3") or a media uclass ("mmc") with an optional sequence number (mmc2). +The argument is a space-separated list of labels. Each label can be the name of +a bootdev (e.g. "mmc1.bootdev"), a bootdev sequence number ("3") or a media +uclass ("mmc") with an optional sequence number (mmc2). -Use `bootdev order clear` to clear any ordering and use the default. +Use `bootdev order -c` to clear any ordering and use the default. By default, the ordering is defined by the `boot_targets` environment variable or, failing that, the bootstd node in the devicetree ("bootdev-order" property). diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index 84280caf7b5..ff3da505d85 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -793,7 +793,7 @@ static int bootdev_test_cmd_order(struct unit_test_state *uts) ut_assert_nextline("mmc1"); ut_assert_console_end(); - ut_assertok(run_command("bootdev order clear", 0)); + ut_assertok(run_command("bootdev order -c", 0)); ut_assertok(run_command("bootdev order", 0)); ut_assert_nextline("No ordering"); ut_assert_console_end(); -- 2.34.1 base-commit: d0792b0848712a84b5fe20ba60f699b48def807e branch: schc3