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] commands: loadx: remove non-existent options from usage string
Date: Thu, 25 Jun 2026 19:30:04 +0200	[thread overview]
Message-ID: <20260625173012.701765-1-a.fatoum@pengutronix.de> (raw)

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




                 reply	other threads:[~2026-06-25 18:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260625173012.701765-1-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