mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/4] commands: fix wrong and incomplete help texts
Date: Mon, 24 Aug 2026 13:55:33 +0200	[thread overview]
Message-ID: <20260824115619.3148656-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20260824115619.3148656-1-a.fatoum@pengutronix.de>

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




  parent reply	other threads:[~2026-08-24 11:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24 11:55 [PATCH 1/4] commands: fix typos and punctuation in " 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260824115619.3148656-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox