diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2014-02-06 17:38:01 -0800 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2014-03-01 08:24:17 -0800 |
commit | 85869fb2d4e65d47fb956cbfde9d154800cefb18 (patch) | |
tree | a249a6734a6e06843429680162332c26cfbaa618 | |
parent | 8e8c2456e1494647e7385915178478bec1036970 (diff) |
wfinfo: Add short option -h for --help
Document it in the manpage too.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r-- | man/wflinfo.1.xml | 1 | ||||
-rw-r--r-- | src/utils/wflinfo.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/man/wflinfo.1.xml b/man/wflinfo.1.xml index e2a590d..a5f1715 100644 --- a/man/wflinfo.1.xml +++ b/man/wflinfo.1.xml @@ -147,6 +147,7 @@ </listitem> </varlistentry> <varlistentry> + <term><option>-h</option></term> <term><option>--help</option></term> <listitem> <para> diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c index dd70a4e..07f3513 100644 --- a/src/utils/wflinfo.c +++ b/src/utils/wflinfo.c @@ -83,7 +83,7 @@ static const char *usage_message = " --debug-context\n" " Create a debug context.\n" "\n" - " --help\n" + " -h, --help\n" " Print wflinfo usage information.\n" "\n" "Examples:\n" @@ -102,7 +102,7 @@ enum { OPT_VERBOSE = 'v', OPT_DEBUG_CONTEXT, OPT_FORWARD_COMPATIBLE, - OPT_HELP, + OPT_HELP = 'h', }; static const struct option get_opts[] = { @@ -319,7 +319,7 @@ parse_args(int argc, char *argv[], struct options *opts) opterr = 0; while (loop_get_opt) { - int opt = getopt_long(argc, argv, "a:p:vV:", get_opts, NULL); + int opt = getopt_long(argc, argv, "a:hp:vV:", get_opts, NULL); switch (opt) { case -1: loop_get_opt = false; |