]> git.sur5r.net Git - u-boot/commitdiff
sandbox: Correct help message <arg> garbling
authorSimon Glass <sjg@chromium.org>
Sun, 10 Nov 2013 17:26:58 +0000 (10:26 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 9 Jan 2014 00:24:23 +0000 (17:24 -0700)
The <arg> is displayed for options with no argument, and omitted for those
with an argument. Swap this around.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/start.c

index 1b1545478470c48bbfe4a9275fb4853d4aa1813a..951ac63f3a16c67a2ce704b06fa1d0424a8e073a 100644 (file)
@@ -50,9 +50,9 @@ int sandbox_early_getopt_check(void)
 
                /* then the long flag */
                if (opt->has_arg)
-                       printf("--%-*s", max_noarg_len, opt->flag);
-               else
                        printf("--%-*s <arg> ", max_arg_len, opt->flag);
+               else
+                       printf("--%-*s", max_noarg_len, opt->flag);
 
                /* finally the help text */
                printf("  %s\n", opt->help);