summaryrefslogtreecommitdiff
path: root/tools/perf/util/parse-options.h
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-10-22 15:15:48 (GMT)
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-10-29 12:32:47 (GMT)
commit42bd71d0812ecd955cf65a14375ebe6a3195d979 (patch)
tree503b3356e0786f3c901171d2752e0e22327bd4ed /tools/perf/util/parse-options.h
parentf45d20ffb654f4559648da402b1608e747d46942 (diff)
downloadlinux-42bd71d0812ecd955cf65a14375ebe6a3195d979.tar.xz
perf tools: Add support for exclusive option
Some options cannot be used at the same time. To handle such options add a new PARSE_OPT_EXCLUSIVE flag and show error message if more than one of them is used. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Acked-by: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1413990949-13953-5-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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/parse-options.h b/tools/perf/util/parse-options.h
index b7c80db..97b153f 100644
--- a/tools/perf/util/parse-options.h
+++ b/tools/perf/util/parse-options.h
@@ -39,6 +39,7 @@ enum parse_opt_option_flags {
PARSE_OPT_HIDDEN = 8,
PARSE_OPT_LASTARG_DEFAULT = 16,
PARSE_OPT_DISABLED = 32,
+ PARSE_OPT_EXCLUSIVE = 64,
};
struct option;
@@ -174,6 +175,7 @@ struct parse_opt_ctx_t {
const char **out;
int argc, cpidx;
const char *opt;
+ const struct option *excl_opt;
int flags;
};