* [PATCH 1/4] commands: fix typos and punctuation in help texts
@ 2026-08-24 11:55 Ahmad Fatoum
2026-08-24 11:55 ` [PATCH 2/4] commands: fix stale option strings in usage lines Ahmad Fatoum
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2026-08-24 11:55 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Fix various spelling and typos found by LLM.
Assisted-by: Claude:fable-5
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/arm/mach-mxs/bcb.c | 2 +-
commands/Kconfig | 2 +-
commands/boot.c | 2 +-
commands/cd.c | 2 +-
commands/clk.c | 2 +-
commands/dhcp.c | 2 +-
commands/dirname.c | 2 +-
commands/dmesg.c | 2 +-
commands/fiptool.c | 2 +-
commands/loadb.c | 2 +-
commands/loadxy.c | 2 +-
commands/memset.c | 2 +-
commands/mount.c | 2 +-
commands/nandtest.c | 2 +-
commands/nvmem.c | 2 +-
commands/of_fixup_status.c | 2 +-
commands/setenv.c | 2 +-
commands/timeout.c | 4 ++--
commands/ubiformat.c | 4 ++--
commands/umount.c | 2 +-
commands/usbgadget.c | 6 +++---
common/hush.c | 6 +++---
net/ifup.c | 2 +-
23 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/arch/arm/mach-mxs/bcb.c b/arch/arm/mach-mxs/bcb.c
index 152a7c3bca5a..c2533c4e497e 100644
--- a/arch/arm/mach-mxs/bcb.c
+++ b/arch/arm/mach-mxs/bcb.c
@@ -389,7 +389,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(bcb)
.cmd = update_bcb,
- BAREBOX_CMD_DESC("writes a i.MX23/28 BCB data structure to flash")
+ BAREBOX_CMD_DESC("writes an i.MX23/28 BCB data structure to flash")
BAREBOX_CMD_OPTS("BOOTSTREAM [BOOTSTREAM]")
BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
BAREBOX_CMD_HELP(cmd_bcb_help)
diff --git a/commands/Kconfig b/commands/Kconfig
index 08fe544ee1a3..792dd3b0b975 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -2637,7 +2637,7 @@ config CMD_OF_FIXUP_STATUS
path Node path or alias
Register a fixup to enable or disable a device tree node.
- Nodes are enabled on default. Disabled with -d.
+ Nodes are enabled by default. Disabled with -d.
config CMD_OF_OVERLAY
tristate
diff --git a/commands/boot.c b/commands/boot.c
index 04bb9eb9186f..17730cd35281 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -231,7 +231,7 @@ BAREBOX_CMD_HELP_TEXT("one succeeds.")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT ("-v","Increase verbosity")
-BAREBOX_CMD_HELP_OPT ("-d","Dryrun. See what happens but do no actually boot (pass twice to run scripts)")
+BAREBOX_CMD_HELP_OPT ("-d","Dryrun. See what happens but do not actually boot (pass twice to run scripts)")
BAREBOX_CMD_HELP_OPT ("-l","List available boot sources")
BAREBOX_CMD_HELP_OPT ("-m","Show a menu with boot options")
BAREBOX_CMD_HELP_OPT ("-M DEFAULT","Show a menu with boot options with entry DEFAULT preselected")
diff --git a/commands/cd.c b/commands/cd.c
index e42beb79b282..a96bbce7c28d 100644
--- a/commands/cd.c
+++ b/commands/cd.c
@@ -53,7 +53,7 @@ static int do_cd(int argc, char *argv[])
BAREBOX_CMD_HELP_START(cd)
BAREBOX_CMD_HELP_TEXT("If called without an argument, change to the root directory '/'.")
BAREBOX_CMD_HELP_TEXT("Use 'cd -' to change to the previous directory.")
-BAREBOX_CMD_HELP_TEXT("Sets OLDPWD environment variables.")
+BAREBOX_CMD_HELP_TEXT("Sets OLDPWD environment variable.")
BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(cd)
diff --git a/commands/clk.c b/commands/clk.c
index 210b61306a2e..2f0b45ba6543 100644
--- a/commands/clk.c
+++ b/commands/clk.c
@@ -72,7 +72,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(clk_set_rate)
.cmd = do_clk_set_rate,
- BAREBOX_CMD_DESC("set a clocks rate")
+ BAREBOX_CMD_DESC("set a clock's rate")
BAREBOX_CMD_OPTS("CLK HZ")
BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
BAREBOX_CMD_HELP(cmd_clk_set_rate_help)
diff --git a/commands/dhcp.c b/commands/dhcp.c
index 79ab546fc7a9..ecd1499892a4 100644
--- a/commands/dhcp.c
+++ b/commands/dhcp.c
@@ -80,7 +80,7 @@ BAREBOX_CMD_HELP_OPT("-c ID\t", "DHCP Client ID (code 61) submitted in DHCP requ
BAREBOX_CMD_HELP_OPT("-u UUID\t", "DHCP Client UUID (code 97) submitted in DHCP requests")
BAREBOX_CMD_HELP_OPT("-U CLASS", "DHCP User class (code 77) submitted in DHCP requests")
BAREBOX_CMD_HELP_OPT("-r RETRY", "retry limit (default 20)")
-BAREBOX_CMD_HELP_OPT("-o PRIVATE DATA", "private data (code 224) submitted in DHCP requests");
+BAREBOX_CMD_HELP_OPT("-o PRIVATE DATA", "private data (code 224) submitted in DHCP requests")
BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(dhcp)
diff --git a/commands/dirname.c b/commands/dirname.c
index f809e7648c41..2108075dacf4 100644
--- a/commands/dirname.c
+++ b/commands/dirname.c
@@ -36,7 +36,7 @@ static int do_dirname(int argc, char *argv[])
}
BAREBOX_CMD_HELP_START(dirname)
-BAREBOX_CMD_HELP_TEXT("Strip last componext of NAME and store into $DIRNAME")
+BAREBOX_CMD_HELP_TEXT("Strip last component of NAME and store into $DIRNAME")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT("-V", "return the path relative to the mountpoint.")
diff --git a/commands/dmesg.c b/commands/dmesg.c
index 06796287aaec..a2493acfacbc 100644
--- a/commands/dmesg.c
+++ b/commands/dmesg.c
@@ -183,7 +183,7 @@ BAREBOX_CMD_HELP_OPT ("-l <loglevel>", "Restrict output to the given (comma-sepa
BAREBOX_CMD_HELP_OPT ("-p <loglevel>", "Restrict output to specified log level at most")
BAREBOX_CMD_HELP_OPT ("-n <loglevel>", "Set level at which printing of messages is done to the console")
BAREBOX_CMD_HELP_OPT ("-r", "Print timestamp and log-level prefixes")
-BAREBOX_CMD_HELP_OPT ("-t", "Show timestamp informations")
+BAREBOX_CMD_HELP_OPT ("-t", "Show timestamp information")
BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(dmesg)
diff --git a/commands/fiptool.c b/commands/fiptool.c
index ccf99491bf66..0452b7a0bdcd 100644
--- a/commands/fiptool.c
+++ b/commands/fiptool.c
@@ -627,7 +627,7 @@ BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("fiptool remove [OPTS] FIP_FILENAME")
BAREBOX_CMD_HELP_OPT("-a VALUE", "Each image is aligned to VALUE (default: 1)")
BAREBOX_CMD_HELP_OPT("-b uuid=UUID", "Remove an image with the given UUID")
-BAREBOX_CMD_HELP_OPT("-f", "force overwrit of the output FIP file if it already exists")
+BAREBOX_CMD_HELP_OPT("-f", "force overwrite of the output FIP file if it already exists")
BAREBOX_CMD_HELP_OPT("-o", "Set an alternative output FIP file")
BAREBOX_CMD_HELP_OPT("-e TYPE", "remove TYPE entry")
#endif
diff --git a/commands/loadb.c b/commands/loadb.c
index 15e844ea6981..e5c99cc7a16d 100644
--- a/commands/loadb.c
+++ b/commands/loadb.c
@@ -682,7 +682,7 @@ BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT("-f FILE", "download to FILE (default image.bin)")
BAREBOX_CMD_HELP_OPT("-o OFFS", "destination file OFFSet (default 0)")
BAREBOX_CMD_HELP_OPT("-b BAUD", "baudrate for download (default: console baudrate)")
-BAREBOX_CMD_HELP_OPT("-c CONSOLE", "Specify console (default: first active console")
+BAREBOX_CMD_HELP_OPT("-c CONSOLE", "Specify console (default: first active console)")
BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(loadb)
diff --git a/commands/loadxy.c b/commands/loadxy.c
index eae9ef86b4cc..370cf49c4997 100644
--- a/commands/loadxy.c
+++ b/commands/loadxy.c
@@ -196,7 +196,7 @@ static int do_loadx(int argc, char *argv[])
BAREBOX_CMD_HELP_START(loadx)
BAREBOX_CMD_HELP_TEXT("Options:")
-BAREBOX_CMD_HELP_OPT("-f FILE", "download to FILE (default image.bin")
+BAREBOX_CMD_HELP_OPT("-f FILE", "download to FILE (default image.bin)")
BAREBOX_CMD_HELP_OPT("-o OFFS", "destination file OFFSet (default 0)")
BAREBOX_CMD_HELP_OPT("-b BAUD", "baudrate for download (default: console baudrate)")
BAREBOX_CMD_HELP_OPT("-t NAME", "console name to use (default: current)")
diff --git a/commands/memset.c b/commands/memset.c
index 1139691f2fc7..f26d0e9fe18c 100644
--- a/commands/memset.c
+++ b/commands/memset.c
@@ -73,7 +73,7 @@ static int do_memset(int argc, char *argv[])
}
BAREBOX_CMD_HELP_START(memset)
-BAREBOX_CMD_HELP_TEXT("Fills the first COUNT bytes at offset ADDR with byte DATA,")
+BAREBOX_CMD_HELP_TEXT("Fills the first COUNT bytes at offset ADDR with byte DATA.")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT ("-b", "byte access")
diff --git a/commands/mount.c b/commands/mount.c
index 002a38e1959f..d44eb15e27bc 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -123,7 +123,7 @@ BAREBOX_CMD_HELP_TEXT("If no FSTYPE is specified, try to detect it automatically
BAREBOX_CMD_HELP_TEXT("With -a the mount command mounts all block devices whose filesystem")
BAREBOX_CMD_HELP_TEXT("can be detected automatically to /mnt/PARTNAME")
BAREBOX_CMD_HELP_TEXT("If mountpoint is not given, a standard mountpoint of /mnt/DEVICE")
-BAREBOX_CMD_HELP_TEXT("is used. This directoy is created automatically if necessary.")
+BAREBOX_CMD_HELP_TEXT("is used. This directory is created automatically if necessary.")
BAREBOX_CMD_HELP_TEXT("With -o loop the mount command mounts a file instead of a device.")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
diff --git a/commands/nandtest.c b/commands/nandtest.c
index fa64d9ccea0b..61deb7bad5c4 100644
--- a/commands/nandtest.c
+++ b/commands/nandtest.c
@@ -399,7 +399,7 @@ BAREBOX_CMD_HELP_OPT ("-t", "Really do a nandtest on device")
BAREBOX_CMD_HELP_OPT ("-r", "Readonly nandtest on device")
BAREBOX_CMD_HELP_OPT ("-m", "Mark blocks bad if they appear so")
BAREBOX_CMD_HELP_OPT ("-s SEED", "supply random seed")
-BAREBOX_CMD_HELP_OPT ("-i ITERATIONS", "nNumber of iterations")
+BAREBOX_CMD_HELP_OPT ("-i ITERATIONS", "Number of iterations")
BAREBOX_CMD_HELP_OPT ("-o OFFS", "start offset on flash")
BAREBOX_CMD_HELP_OPT ("-l LEN", "length of flash to test")
BAREBOX_CMD_HELP_END
diff --git a/commands/nvmem.c b/commands/nvmem.c
index f61cd783ab01..c6bb4bd85f34 100644
--- a/commands/nvmem.c
+++ b/commands/nvmem.c
@@ -118,7 +118,7 @@ BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT("-c <size>", "Create a new RAM-backed NVMEM device of")
BAREBOX_CMD_HELP_OPT(" ", "<size> bytes. (Requires CONFIG_NVMEM_RMEM")
-BAREBOX_CMD_HELP_OPT(" ", "to be enabled). <size> must be a non-zero.")
+BAREBOX_CMD_HELP_OPT(" ", "to be enabled). <size> must be non-zero.")
BAREBOX_CMD_HELP_OPT("-v <variable>", "When using -c, set environment variable")
BAREBOX_CMD_HELP_OPT(" ", "<variable> to the name of the created")
BAREBOX_CMD_HELP_OPT(" ", "NVMEM device (e.g., rmem0).")
diff --git a/commands/of_fixup_status.c b/commands/of_fixup_status.c
index 50c1bbb146d0..6c59dc7beb49 100644
--- a/commands/of_fixup_status.c
+++ b/commands/of_fixup_status.c
@@ -49,7 +49,7 @@ BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT("-d", "disable node")
BAREBOX_CMD_HELP_OPT("path", "Node path")
BAREBOX_CMD_HELP_TEXT("Register a fixup to enable or disable a device tree node.")
-BAREBOX_CMD_HELP_TEXT("Nodes are enabled on default. Disabled with -d.")
+BAREBOX_CMD_HELP_TEXT("Nodes are enabled by default. Disabled with -d.")
BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(of_fixup_status)
diff --git a/commands/setenv.c b/commands/setenv.c
index 99604c35c37c..8fb42b896e39 100644
--- a/commands/setenv.c
+++ b/commands/setenv.c
@@ -29,7 +29,7 @@ static int do_setenv(int argc, char *argv[])
BAREBOX_CMD_HELP_START(setenv)
BAREBOX_CMD_HELP_TEXT("Set environment variable NAME to VALUE.")
-BAREBOX_CMD_HELP_TEXT("If VALUE is ommitted, then the variable is deleted.")
+BAREBOX_CMD_HELP_TEXT("If VALUE is omitted, then the variable is deleted.")
BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(setenv)
diff --git a/commands/timeout.c b/commands/timeout.c
index ba55846c5582..733fe57d2445 100644
--- a/commands/timeout.c
+++ b/commands/timeout.c
@@ -56,13 +56,13 @@ static int do_timeout(int argc, char *argv[])
}
BAREBOX_CMD_HELP_START(timeout)
-BAREBOX_CMD_HELP_TEXT("Wait SECONDS for a timeout. Return 1 if the user intervented.")
+BAREBOX_CMD_HELP_TEXT("Wait SECONDS for a timeout. Return 1 if the user intervened.")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT("-a", "interrupt on any key")
BAREBOX_CMD_HELP_OPT("-c", "interrupt on Ctrl-C")
BAREBOX_CMD_HELP_OPT("-r", "interrupt on RETURN")
-BAREBOX_CMD_HELP_OPT("-e", "interrupt on external commands (i.e. fastboot")
+BAREBOX_CMD_HELP_OPT("-e", "interrupt on external commands (i.e. fastboot)")
BAREBOX_CMD_HELP_OPT("-s", "silent mode")
BAREBOX_CMD_HELP_OPT("-v <VARIABLE>", "export pressed key to environment")
BAREBOX_CMD_HELP_END
diff --git a/commands/ubiformat.c b/commands/ubiformat.c
index 75cf234e2e55..cb52cd9f6aac 100644
--- a/commands/ubiformat.c
+++ b/commands/ubiformat.c
@@ -171,10 +171,10 @@ BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT("-s BYTES", "minimum input/output unit used for UBI headers")
BAREBOX_CMD_HELP_OPT("\t", "e.g. sub-page size in case of NAND flash")
-BAREBOX_CMD_HELP_OPT("-O OFFS\t", "offset if the VID header from start of the")
+BAREBOX_CMD_HELP_OPT("-O OFFS\t", "offset of the VID header from start of the")
BAREBOX_CMD_HELP_OPT("\t", "physical eraseblock (default is the next minimum I/O unit or")
BAREBOX_CMD_HELP_OPT("\t", "sub-page after the EC header)")
-BAREBOX_CMD_HELP_OPT("-n\t", "only erase all eraseblock and preserve erase")
+BAREBOX_CMD_HELP_OPT("-n\t", "only erase all eraseblocks and preserve erase")
BAREBOX_CMD_HELP_OPT("\t", "counters, do not write empty volume table")
BAREBOX_CMD_HELP_OPT("-f FILE\t", "flash image file")
BAREBOX_CMD_HELP_OPT("-e VALUE", "use VALUE as erase counter value for all eraseblocks")
diff --git a/commands/umount.c b/commands/umount.c
index b26c7c3942ab..ead24c32ae71 100644
--- a/commands/umount.c
+++ b/commands/umount.c
@@ -18,7 +18,7 @@ static int do_umount(int argc, char *argv[])
BAREBOX_CMD_HELP_START(umount)
-BAREBOX_CMD_HELP_TEXT("Unmount a filesystem mounted on a specific MOINTPOINT")
+BAREBOX_CMD_HELP_TEXT("Unmount a filesystem mounted on a specific MOUNTPOINT")
BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(umount)
diff --git a/commands/usbgadget.c b/commands/usbgadget.c
index 2edccca1f36c..61d848c083cd 100644
--- a/commands/usbgadget.c
+++ b/commands/usbgadget.c
@@ -60,12 +60,12 @@ BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT ("-a\t", "Create CDC ACM function")
BAREBOX_CMD_HELP_OPT ("-A <desc>", "Create Android Fastboot function. If 'desc' is not provided, "
"try to use 'global.fastboot.partitions' variable.")
-BAREBOX_CMD_HELP_OPT ("-b\t", "include registered barebox update handlers (fastboot specific,"
+BAREBOX_CMD_HELP_OPT ("-b\t", "include registered barebox update handlers (fastboot specific, "
"exported as 'bbu-<update_handler_name>' partitions)")
BAREBOX_CMD_HELP_OPT ("-D <desc>", "Create DFU function. If 'desc' is not provided, "
"try to use 'global.usbgadget.dfu_function' variable.")
-BAREBOX_CMD_HELP_OPT ("-S <desc>", "Create USB Mass Storage function. If 'desc' is not provided,"
- "fallback directly to 'global.system.partitions' variable.")
+BAREBOX_CMD_HELP_OPT ("-S <desc>", "Create USB Mass Storage function. If 'desc' is not provided, "
+ "fall back directly to 'global.system.partitions' variable.")
BAREBOX_CMD_HELP_OPT ("-d\t", "Disable the currently running gadget")
BAREBOX_CMD_HELP_END
diff --git a/common/hush.c b/common/hush.c
index 152eebdca919..f5208470362a 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -2089,8 +2089,8 @@ static int do_dummy_command(int argc, char *argv[])
}
BAREBOX_CMD_HELP_START(exit)
-BAREBOX_CMD_HELP_TEXT("Exit script with status ERRLVL n. If ERRLVL is omitted, the exit status is")
-BAREBOX_CMD_HELP_TEXT("of the last command executed")
+BAREBOX_CMD_HELP_TEXT("Exit script with status ERRLVL. If ERRLVL is omitted, the exit status is")
+BAREBOX_CMD_HELP_TEXT("that of the last command executed")
BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(exit)
@@ -2103,7 +2103,7 @@ BAREBOX_CMD_END
#ifdef CONFIG_CMD_GETOPT
BAREBOX_CMD_HELP_START(getopt)
-BAREBOX_CMD_HELP_TEXT("OPTSTRING contains the option letters. Add a colon to an options if this")
+BAREBOX_CMD_HELP_TEXT("OPTSTRING contains the option letters. Add a colon to an option if this")
BAREBOX_CMD_HELP_TEXT("option has a required argument or two colons for an optional argument. The")
BAREBOX_CMD_HELP_TEXT("current option is saved in VAR, arguments are saved in $OPTARG. Any")
BAREBOX_CMD_HELP_TEXT("non-option arguments can be accessed starting from $1.")
diff --git a/net/ifup.c b/net/ifup.c
index 9e87cfc58f7e..cffdfe7c9bfb 100644
--- a/net/ifup.c
+++ b/net/ifup.c
@@ -429,7 +429,7 @@ static int do_ifup(int argc, char *argv[])
BAREBOX_CMD_HELP_START(ifup)
-BAREBOX_CMD_HELP_TEXT("Network interfaces are configured with a NV variables or a")
+BAREBOX_CMD_HELP_TEXT("Network interfaces are configured with NV variables or a")
BAREBOX_CMD_HELP_TEXT("/env/network/<intf> file. See Documentation/user/networking.rst")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 2/4] commands: fix stale option strings in usage lines
2026-08-24 11:55 [PATCH 1/4] commands: fix typos and punctuation in help texts Ahmad Fatoum
@ 2026-08-24 11:55 ` Ahmad Fatoum
2026-08-24 11:55 ` [PATCH 3/4] commands: fix wrong and incomplete help texts Ahmad Fatoum
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2026-08-24 11:55 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
The BAREBOX_CMD_OPTS strings of several commands have fallen out of sync
with the options their parsers actually accept.
Sync the usage lines with the getopt strings so the generated
documentation and the built-in help don't confuse users.
Assisted-by: Claude:fable-5
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/arm/mach-at91/boot_test_cmd.c | 2 +-
commands/boot.c | 2 +-
commands/dmesg.c | 2 +-
commands/memset.c | 2 +-
commands/nandtest.c | 2 +-
commands/pwm.c | 2 +-
commands/splash.c | 2 +-
commands/ubiformat.c | 2 +-
efi/payload/init.c | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-at91/boot_test_cmd.c b/arch/arm/mach-at91/boot_test_cmd.c
index 9a5c0e3e4e06..a5643c54915f 100644
--- a/arch/arm/mach-at91/boot_test_cmd.c
+++ b/arch/arm/mach-at91/boot_test_cmd.c
@@ -92,7 +92,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(at91_boot_test)
.cmd = do_at91_boot_test,
BAREBOX_CMD_DESC("load and execute from SRAM")
- BAREBOX_CMD_OPTS("at91_boot_test [-js] FILE")
+ BAREBOX_CMD_OPTS("[-js] FILE")
BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
BAREBOX_CMD_HELP(cmd_at91_boot_test_help)
BAREBOX_CMD_END
diff --git a/commands/boot.c b/commands/boot.c
index 17730cd35281..88a7aec32ea4 100644
--- a/commands/boot.c
+++ b/commands/boot.c
@@ -246,7 +246,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(boot)
.cmd = do_boot,
BAREBOX_CMD_DESC("boot from script, device, ...")
- BAREBOX_CMD_OPTS("[-vdlmMwt] [BOOTSRC...]")
+ BAREBOX_CMD_OPTS("[-vdlmMwto] [BOOTSRC...]")
BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
BAREBOX_CMD_HELP(cmd_boot_help)
BAREBOX_CMD_END
diff --git a/commands/dmesg.c b/commands/dmesg.c
index a2493acfacbc..b405cf4f1d13 100644
--- a/commands/dmesg.c
+++ b/commands/dmesg.c
@@ -189,7 +189,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(dmesg)
.cmd = do_dmesg,
BAREBOX_CMD_DESC("Print or control log messages")
- BAREBOX_CMD_OPTS("[-cdelprt]")
+ BAREBOX_CMD_OPTS("[-cdelnprt]")
BAREBOX_CMD_GROUP(CMD_GRP_INFO)
BAREBOX_CMD_HELP(cmd_dmesg_help)
BAREBOX_CMD_END
diff --git a/commands/memset.c b/commands/memset.c
index f26d0e9fe18c..ac6b7344d55d 100644
--- a/commands/memset.c
+++ b/commands/memset.c
@@ -86,7 +86,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(memset)
.cmd = do_memset,
BAREBOX_CMD_DESC("memory fill")
- BAREBOX_CMD_OPTS("[-bwlq [-d FILE] ADDR DATA COUNT")
+ BAREBOX_CMD_OPTS("[-bwlq] [-d FILE] ADDR DATA COUNT")
BAREBOX_CMD_GROUP(CMD_GRP_MEM)
BAREBOX_CMD_HELP(cmd_memset_help)
BAREBOX_CMD_END
diff --git a/commands/nandtest.c b/commands/nandtest.c
index 61deb7bad5c4..359401f98e86 100644
--- a/commands/nandtest.c
+++ b/commands/nandtest.c
@@ -407,7 +407,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(nandtest)
.cmd = do_nandtest,
BAREBOX_CMD_DESC("NAND flash memory test")
- BAREBOX_CMD_OPTS("[-tmsiol] NANDDEVICE")
+ BAREBOX_CMD_OPTS("[-trmsiol] NANDDEVICE")
BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
BAREBOX_CMD_HELP(cmd_nandtest_help)
BAREBOX_CMD_END
diff --git a/commands/pwm.c b/commands/pwm.c
index fec6abe82576..6e0ba2c2e36f 100644
--- a/commands/pwm.c
+++ b/commands/pwm.c
@@ -206,7 +206,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(pwm)
.cmd = do_pwm_cmd,
BAREBOX_CMD_DESC("pwm")
- BAREBOX_CMD_OPTS("[-ldDPfwisv]")
+ BAREBOX_CMD_OPTS("[-ldDPfwFisv]")
BAREBOX_CMD_GROUP(CMD_GRP_HWMANIP)
BAREBOX_CMD_HELP(cmd_pwm_help)
BAREBOX_CMD_END
diff --git a/commands/splash.c b/commands/splash.c
index dffe29f92328..4eba681384b0 100644
--- a/commands/splash.c
+++ b/commands/splash.c
@@ -97,7 +97,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(splash)
.cmd = do_splash,
BAREBOX_CMD_DESC("display a BMP or PNG splash image")
- BAREBOX_CMD_OPTS("[-fxyno] FILE")
+ BAREBOX_CMD_OPTS("[-fxyb] FILE")
BAREBOX_CMD_GROUP(CMD_GRP_CONSOLE)
BAREBOX_CMD_HELP(cmd_splash_help)
BAREBOX_CMD_END
diff --git a/commands/ubiformat.c b/commands/ubiformat.c
index cb52cd9f6aac..a9b79b711f5d 100644
--- a/commands/ubiformat.c
+++ b/commands/ubiformat.c
@@ -192,7 +192,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(ubiformat)
.cmd = do_ubiformat,
BAREBOX_CMD_DESC("format an ubi volume")
- BAREBOX_CMD_OPTS("[-sOnfexQqv] MTDEVICE")
+ BAREBOX_CMD_OPTS("[-sOnfexQyqv] MTDEVICE")
BAREBOX_CMD_GROUP(CMD_GRP_PART)
BAREBOX_CMD_HELP(cmd_ubiformat_help)
BAREBOX_CMD_END
diff --git a/efi/payload/init.c b/efi/payload/init.c
index 6d2bd046e4c2..862ca6a3e7d6 100644
--- a/efi/payload/init.c
+++ b/efi/payload/init.c
@@ -356,7 +356,7 @@ BAREBOX_CMD_HELP_END
BAREBOX_CMD_START(efiexit)
.cmd = do_efiexit,
BAREBOX_CMD_DESC("Leave barebox and return to the calling EFI process")
- BAREBOX_CMD_OPTS("[-flrw]")
+ BAREBOX_CMD_OPTS("[-f]")
BAREBOX_CMD_GROUP(CMD_GRP_MISC)
BAREBOX_CMD_HELP(cmd_efiexit_help)
BAREBOX_CMD_END
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 3/4] commands: fix wrong and incomplete help texts
2026-08-24 11:55 [PATCH 1/4] commands: fix typos and punctuation in help texts Ahmad Fatoum
2026-08-24 11:55 ` [PATCH 2/4] commands: fix stale option strings in usage lines Ahmad Fatoum
@ 2026-08-24 11:55 ` Ahmad Fatoum
2026-08-24 11:55 ` [PATCH 4/4] Documentation: gen_commands: deduplicate entries from multiple definitions Ahmad Fatoum
2026-08-24 12:30 ` [PATCH 1/4] commands: fix typos and punctuation in help texts Sascha Hauer
3 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2026-08-24 11:55 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Several built-in help texts do not describe what the command actually
does or misdocument its options:
* bootrom and fiptool carried a description copy-pasted from ls,
claiming to "list information about the specified files or
directories"
* devinfo promised "default information" where detailed information is
meant
* dmesg documented the vdebug loglevel as 7 when it is 8
* pwm did not document its -F option at all
* spi did not show that -c takes a chip select argument
Correct the descriptions so that both the shell help and the generated
command reference describe the actual behavior.
Assisted-by: Claude:fable-5
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
arch/arm/mach-imx/bootrom-cmd.c | 2 +-
commands/devinfo.c | 2 +-
commands/dmesg.c | 2 +-
commands/fiptool.c | 2 +-
commands/pwm.c | 1 +
commands/spi.c | 2 +-
6 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-imx/bootrom-cmd.c b/arch/arm/mach-imx/bootrom-cmd.c
index afdf1302254b..7f569f295595 100644
--- a/arch/arm/mach-imx/bootrom-cmd.c
+++ b/arch/arm/mach-imx/bootrom-cmd.c
@@ -212,7 +212,7 @@ static int do_bootrom(int argc, char *argv[])
}
BAREBOX_CMD_HELP_START(bootrom)
-BAREBOX_CMD_HELP_TEXT("List information about the specified files or directories.")
+BAREBOX_CMD_HELP_TEXT("Decode and print the BootROM event log on i.MX8M.")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT ("-l", "list event log")
diff --git a/commands/devinfo.c b/commands/devinfo.c
index 20f21a95b3e7..7bce71c8c92a 100644
--- a/commands/devinfo.c
+++ b/commands/devinfo.c
@@ -144,7 +144,7 @@ BAREBOX_CMD_HELP_TEXT("If called without arguments, devinfo shows a summary of t
BAREBOX_CMD_HELP_TEXT("devices.")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("If called with a device path being the argument, devinfo shows more")
-BAREBOX_CMD_HELP_TEXT("default information about this device and its parameters.")
+BAREBOX_CMD_HELP_TEXT("detailed information about this device and its parameters.")
BAREBOX_CMD_HELP_END
diff --git a/commands/dmesg.c b/commands/dmesg.c
index b405cf4f1d13..0ad0d199eb93 100644
--- a/commands/dmesg.c
+++ b/commands/dmesg.c
@@ -171,7 +171,7 @@ static int do_dmesg(int argc, char *argv[])
BAREBOX_CMD_HELP_START(dmesg)
BAREBOX_CMD_HELP_TEXT("print or control the barebox message buffer")
-BAREBOX_CMD_HELP_TEXT("Loglevels can be specified as number (0=emerg, 7=vdebug)")
+BAREBOX_CMD_HELP_TEXT("Loglevels can be specified as number (0=emerg, 8=vdebug)")
BAREBOX_CMD_HELP_TEXT("Known debug loglevels are: emerg, alert, crit, err, warn, notice, info, debug,")
BAREBOX_CMD_HELP_TEXT("vdebug")
BAREBOX_CMD_HELP_TEXT("")
diff --git a/commands/fiptool.c b/commands/fiptool.c
index 0452b7a0bdcd..a0e67ed43936 100644
--- a/commands/fiptool.c
+++ b/commands/fiptool.c
@@ -588,7 +588,7 @@ static int do_fiptool(int argc, char *argv[])
}
BAREBOX_CMD_HELP_START(fiptool)
-BAREBOX_CMD_HELP_TEXT("List information about the specified files or directories")
+BAREBOX_CMD_HELP_TEXT("Inspect and manipulate TF-A firmware image packages")
BAREBOX_CMD_HELP_TEXT("")
BAREBOX_CMD_HELP_TEXT("Global options:")
BAREBOX_CMD_HELP_OPT ("-v", "verbose output")
diff --git a/commands/pwm.c b/commands/pwm.c
index 6e0ba2c2e36f..f1887efd12fe 100644
--- a/commands/pwm.c
+++ b/commands/pwm.c
@@ -197,6 +197,7 @@ BAREBOX_CMD_HELP_OPT("-d <name>", "device name (eg 'pwm0')")
BAREBOX_CMD_HELP_OPT("-D <duty_ns>", "duty cycle (ns)")
BAREBOX_CMD_HELP_OPT("-P <period_ns>", "period (ns)")
BAREBOX_CMD_HELP_OPT("-f <freq_hz>", "frequency (Hz)")
+BAREBOX_CMD_HELP_OPT("-F <freq_hz>", "frequency (Hz), defaulting duty cycle to 50%")
BAREBOX_CMD_HELP_OPT("-w <duty_%>", "duty cycle (%) - the on 'width' of each cycle")
BAREBOX_CMD_HELP_OPT("-i\t", "line inverted polarity")
BAREBOX_CMD_HELP_OPT("-s\t", "stop (disable) the pwm device")
diff --git a/commands/spi.c b/commands/spi.c
index c6cfd4fbba78..45bd19223326 100644
--- a/commands/spi.c
+++ b/commands/spi.c
@@ -116,7 +116,7 @@ BAREBOX_CMD_HELP_START(spi)
BAREBOX_CMD_HELP_TEXT("Options:")
BAREBOX_CMD_HELP_OPT ("-b BUS\t", "SPI bus number (default 0)")
BAREBOX_CMD_HELP_OPT ("-r COUNT", "bytes to read")
-BAREBOX_CMD_HELP_OPT ("-c\t", "chip select (default 0)")
+BAREBOX_CMD_HELP_OPT ("-c CS\t", "chip select (default 0)")
BAREBOX_CMD_HELP_OPT ("-m MODE\t", "SPI mode (default 0)")
BAREBOX_CMD_HELP_OPT ("-f HZ\t", "max speed frequency, in Hz (default 1 MHz)")
BAREBOX_CMD_HELP_OPT ("-w BIT\t", "bits per word (default 8)")
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 4/4] Documentation: gen_commands: deduplicate entries from multiple definitions
2026-08-24 11:55 [PATCH 1/4] commands: fix typos and punctuation in help texts Ahmad Fatoum
2026-08-24 11:55 ` [PATCH 2/4] commands: fix stale option strings in usage lines Ahmad Fatoum
2026-08-24 11:55 ` [PATCH 3/4] commands: fix wrong and incomplete help texts Ahmad Fatoum
@ 2026-08-24 11:55 ` Ahmad Fatoum
2026-08-24 12:30 ` [PATCH 1/4] commands: fix typos and punctuation in help texts Sascha Hauer
3 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2026-08-24 11:55 UTC (permalink / raw)
To: barebox; +Cc: Ahmad Fatoum
Some commands, like cpuinfo, are defined once per architecture with
identical BAREBOX_CMD_DESC/OPTS/HELP blocks. When several such
definitions end up in one parse run, the generated rst repeated the
description, usage string and every option once per definition:
https://www.barebox.org/doc/2026.07.0/commands/info/cpuinfo.html
Deduplicate descriptions, usage strings and option lists before
emitting them, and join multiple usage strings with a space instead of
concatenating them back to back. Also preserve leading indentation of
help text lines by only stripping trailing whitespace, so preformatted
help text is not flattened.
Assisted-by: Claude:fable-5
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Documentation/gen_commands.py | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/Documentation/gen_commands.py b/Documentation/gen_commands.py
index 1a7353a854cd..04d7cc3b435a 100755
--- a/Documentation/gen_commands.py
+++ b/Documentation/gen_commands.py
@@ -57,7 +57,7 @@ def parse_c(name):
elif x := HELP_TEXT.match(line):
last = cmd['h_post' if 'h_opts' in cmd else 'h_pre']
- last.append(string_escape_literal(x.group(1)).strip())
+ last.append(string_escape_literal(x.group(1)).rstrip())
elif x := HELP_OPT.match(line):
last = cmd['h_opts']
@@ -97,6 +97,17 @@ def parse_c(name):
cmd = last = None
+def uniq(seq):
+ seen = set()
+ out = []
+ for x in seq:
+ key = tuple(x) if isinstance(x, list) else x
+ if key not in seen:
+ seen.add(key)
+ out.append(x)
+ return out
+
+
def gen_rst(name, cmd):
out = []
out.append('.. index:: %s (command)' % name)
@@ -104,7 +115,7 @@ def gen_rst(name, cmd):
out.append('.. _command_%s:' % name)
out.append('')
if 'c_desc' in cmd:
- out.append("%s - %s" % (string_escape(name), ''.join(cmd['c_desc']).strip()))
+ out.append("%s - %s" % (string_escape(name), ''.join(uniq(cmd['c_desc'])).strip()))
else:
out.append("%s" % (string_escape(name),))
out.append('=' * len(out[-1]))
@@ -112,7 +123,7 @@ def gen_rst(name, cmd):
if 'c_opts' in cmd:
out.append('Usage')
out.append('^' * len(out[-1]))
- out.append('``%s %s``' % (name, ''.join(cmd['c_opts']).strip()))
+ out.append('``%s %s``' % (name, ' '.join(uniq(cmd['c_opts'])).strip()))
out.append('')
if 'h_pre' in cmd:
pre = cmd['h_pre']
@@ -129,7 +140,7 @@ def gen_rst(name, cmd):
if 'h_opts' in cmd:
out.append('Options')
out.append('^' * len(out[-1]))
- for o, d in cmd['h_opts']:
+ for o, d in uniq(cmd['h_opts']):
o = o.strip()
d = d.strip()
if o:
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 1/4] commands: fix typos and punctuation in help texts
2026-08-24 11:55 [PATCH 1/4] commands: fix typos and punctuation in help texts Ahmad Fatoum
` (2 preceding siblings ...)
2026-08-24 11:55 ` [PATCH 4/4] Documentation: gen_commands: deduplicate entries from multiple definitions Ahmad Fatoum
@ 2026-08-24 12:30 ` Sascha Hauer
3 siblings, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2026-08-24 12:30 UTC (permalink / raw)
To: barebox, Ahmad Fatoum
On Mon, 24 Aug 2026 13:55:31 +0200, Ahmad Fatoum wrote:
> Fix various spelling and typos found by LLM.
>
>
Applied, thanks!
[1/4] commands: fix typos and punctuation in help texts
https://git.pengutronix.de/cgit/barebox/commit/?id=bd532b68fb1a (link may not be stable)
[2/4] commands: fix stale option strings in usage lines
https://git.pengutronix.de/cgit/barebox/commit/?id=a7e9b7bc9668 (link may not be stable)
[3/4] commands: fix wrong and incomplete help texts
https://git.pengutronix.de/cgit/barebox/commit/?id=374565eaf7e5 (link may not be stable)
[4/4] Documentation: gen_commands: deduplicate entries from multiple definitions
https://git.pengutronix.de/cgit/barebox/commit/?id=6a0247818804 (link may not be stable)
Best regards,
--
Sascha Hauer <s.hauer@pengutronix.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-08-24 12:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-24 11:55 [PATCH 1/4] commands: fix typos and punctuation in help texts Ahmad Fatoum
2026-08-24 11:55 ` [PATCH 2/4] commands: fix stale option strings in usage lines Ahmad Fatoum
2026-08-24 11:55 ` [PATCH 3/4] commands: fix wrong and incomplete help texts Ahmad Fatoum
2026-08-24 11:55 ` [PATCH 4/4] Documentation: gen_commands: deduplicate entries from multiple definitions Ahmad Fatoum
2026-08-24 12:30 ` [PATCH 1/4] commands: fix typos and punctuation in help texts Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox