diff options
| author | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-10-05 11:22:58 +0200 |
|---|---|---|
| committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2010-10-05 11:24:02 +0200 |
| commit | 6d49343abb0f90fdb2dd88ca639038cc7302c3dc (patch) | |
| tree | 2318ebf5f07a4c007eea56fd4414e67c177d7754 /lib/utils/parse_options.c | |
| parent | aacc4082c747557a04627b304fce07ca7cdae8b2 (diff) | |
parse_options.c: add argument help
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
Diffstat (limited to 'lib/utils/parse_options.c')
| -rw-r--r-- | lib/utils/parse_options.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils/parse_options.c b/lib/utils/parse_options.c index 6928e481..b891066b 100644 --- a/lib/utils/parse_options.c +++ b/lib/utils/parse_options.c @@ -39,6 +39,9 @@ void parse_usage_and_die(const char * const * usage, const struct options *opt) if (opt->long_name) pos += fprintf(stderr, "--%s", opt->long_name); + if (opt->argh) + pos += fprintf(stderr, " <%s>", opt->argh); + if (pos <= USAGE_OPTS_WIDTH) pad = USAGE_OPTS_WIDTH - pos; else |
