[PATCH] commands: loadx: remove non-existent options from usage string
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Jun 25 10:30:04 PDT 2026
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 at 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
More information about the barebox
mailing list