diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2013-11-01 16:33:11 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-11-04 12:51:45 -0300 |
commit | ac6976255076d4bf761abfbecb19d46af5b88046 (patch) | |
tree | f920702242039849a9ac11db83794f6ad0757541 /tools/perf/util/parse-options.h | |
parent | 42d88910c717ba21089251d0ca559abfef0df22d (diff) |
perf tools: Show single option when failed to parse
Current option parser outputs whole option help string when it failed to
parse an option. However this is not good for user if the command has
many option, she might feel hard which one is related easily.
Fix it by just showing the help message of the given option only.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Requested-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Enthusiastically-Supported-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1383291195-24386-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/parse-options.h')
-rw-r--r-- | tools/perf/util/parse-options.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/parse-options.h b/tools/perf/util/parse-options.h index 7bb5999940c..b0241e28eaf 100644 --- a/tools/perf/util/parse-options.h +++ b/tools/perf/util/parse-options.h @@ -158,7 +158,9 @@ struct parse_opt_ctx_t { }; extern int parse_options_usage(const char * const *usagestr, - const struct option *opts); + const struct option *opts, + const char *optstr, + bool short_opt); extern void parse_options_start(struct parse_opt_ctx_t *ctx, int argc, const char **argv, int flags); |