summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich Ölmann <u.oelmann@pengutronix.de>2019-02-03 22:47:59 +0100
committerRoland Hieber <rhi@pengutronix.de>2019-02-07 12:34:15 +0100
commit52221e50b0df0e7de75c20cc7e1fee045e7cca14 (patch)
treed0a2c629c45f14a5bd0a068676e3ab275891cb37
parent99918b8f3ad2bec78969434365a3be6ba5f44cdd (diff)
downloaddt-utils-52221e50b0df0e7de75c20cc7e1fee045e7cca14.tar.gz
dt-utils-52221e50b0df0e7de75c20cc7e1fee045e7cca14.tar.xz
barebox-state: complete cmdline options
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.oelmann@pengutronix.de> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
-rw-r--r--src/barebox-state.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/barebox-state.c b/src/barebox-state.c
index 76d0475..0f40044 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);
}