mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] commands: loadx: remove non-existent options from usage string
@ 2026-06-25 17:30 Ahmad Fatoum
  0 siblings, 0 replies; only message in thread
From: Ahmad Fatoum @ 2026-06-25 17:30 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

There is no -p or -c option, so drop them from the usage string as well
as from the getopt argument if they fall through into the error
(default) case.

Reported-by: Jakthree # IRC
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 commands/loadxy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/commands/loadxy.c b/commands/loadxy.c
index dd9a3b8b4ba1..eae9ef86b4cc 100644
--- a/commands/loadxy.c
+++ b/commands/loadxy.c
@@ -128,7 +128,7 @@ static int do_loadx(int argc, char *argv[])
 	char *output_file = NULL, *cname = NULL;
 	struct console_device *cdev = NULL;
 
-	while ((opt = getopt(argc, argv, "f:b:t:o:c")) > 0) {
+	while ((opt = getopt(argc, argv, "f:b:t:o:")) > 0) {
 		switch (opt) {
 		case 'f':
 			output_file = optarg;
@@ -205,7 +205,7 @@ BAREBOX_CMD_HELP_END
 BAREBOX_CMD_START(loadx)
 	.cmd = do_loadx,
 	BAREBOX_CMD_DESC("load binary file over serial line (X-Modem)")
-	BAREBOX_CMD_OPTS("[-fptbc]")
+	BAREBOX_CMD_OPTS("[-ftbo]")
 	BAREBOX_CMD_GROUP(CMD_GRP_BOOT)
 	BAREBOX_CMD_HELP(cmd_loadx_help)
 BAREBOX_CMD_END
-- 
2.47.3




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-25 18:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-25 17:30 [PATCH] commands: loadx: remove non-existent options from usage string Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox