Make the commandline options consistent and complete:

  - option "-h" already had a long equivalent "--help", so reflect that in the
    usage() message.
  - for option "-q" the usage() message promised a long equivalent "--quiet"
    that did not exist.
  - the call to getopt_long() already allowed the option "-f" in its optstring,
    but the usage() message said nothing about it, hence amend that and offer
    the long option "--force" as well.

Signed-off-by: Ulrich Ölmann <u.oelm...@pengutronix.de>
---
 src/barebox-state.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/barebox-state.c b/src/barebox-state.c
index 76d047559a4f..0f40044bc2c6 100644
--- a/src/barebox-state.c
+++ b/src/barebox-state.c
@@ -374,7 +374,9 @@ static struct option long_options[] = {
        {"name",        required_argument,      0,      'n' },
        {"dump",        no_argument,            0,      'd' },
        {"dump-shell",  no_argument,            0,      OPT_DUMP_SHELL },
+       {"force",       no_argument,            0,      'f' },
        {"verbose",     no_argument,            0,      'v' },
+       {"quiet",       no_argument,            0,      'q' },
        {"help",        no_argument,            0,      'h' },
        { }
 };
@@ -389,9 +391,10 @@ static void usage(char *name)
 "-n, --name <name>                         specify the state to use 
(default=\"state\"). Multiple states are allowed.\n"
 "-d, --dump                                dump the state\n"
 "--dump-shell                              dump the state suitable for shell 
sourcing\n"
+"-f, --force                               do not check for state manipulation 
via the HMAC\n"
 "-v, --verbose                             increase verbosity\n"
 "-q, --quiet                               decrease verbosity\n"
-"--help                                    this help\n",
+"-h, --help                                this help\n",
        name);
 }
 
-- 
2.20.1


_______________________________________________
OSS-Tools mailing list
OSS-Tools@pengutronix.de

Reply via email to