diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-10-18 14:24:07 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-10-19 10:56:58 -0400 |
commit | 4ba8b3ebf4f8f583c2c01da20e4d110a5881ffdd (patch) | |
tree | d3f336fe6e030373d13e25af7aca8134df77f0fe /tools/lib/subcmd/parse-options.h | |
parent | 389373d3306553896a9e218493e5b6175c844eb0 (diff) |
tools lib subcmd: Introduce OPTION_ULONG
For completeness, will be used in 'perf trace --max-events'.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Kim Phillips <kim.phillips@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-glaj3pwespxfj2fdjs9a20b6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/subcmd/parse-options.h')
-rw-r--r-- | tools/lib/subcmd/parse-options.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/subcmd/parse-options.h b/tools/lib/subcmd/parse-options.h index 92fdbe1519f6..6ca2a8bfe716 100644 --- a/tools/lib/subcmd/parse-options.h +++ b/tools/lib/subcmd/parse-options.h | |||
@@ -25,6 +25,7 @@ enum parse_opt_type { | |||
25 | OPTION_STRING, | 25 | OPTION_STRING, |
26 | OPTION_INTEGER, | 26 | OPTION_INTEGER, |
27 | OPTION_LONG, | 27 | OPTION_LONG, |
28 | OPTION_ULONG, | ||
28 | OPTION_CALLBACK, | 29 | OPTION_CALLBACK, |
29 | OPTION_U64, | 30 | OPTION_U64, |
30 | OPTION_UINTEGER, | 31 | OPTION_UINTEGER, |
@@ -133,6 +134,7 @@ struct option { | |||
133 | #define OPT_INTEGER(s, l, v, h) { .type = OPTION_INTEGER, .short_name = (s), .long_name = (l), .value = check_vtype(v, int *), .help = (h) } | 134 | #define OPT_INTEGER(s, l, v, h) { .type = OPTION_INTEGER, .short_name = (s), .long_name = (l), .value = check_vtype(v, int *), .help = (h) } |
134 | #define OPT_UINTEGER(s, l, v, h) { .type = OPTION_UINTEGER, .short_name = (s), .long_name = (l), .value = check_vtype(v, unsigned int *), .help = (h) } | 135 | #define OPT_UINTEGER(s, l, v, h) { .type = OPTION_UINTEGER, .short_name = (s), .long_name = (l), .value = check_vtype(v, unsigned int *), .help = (h) } |
135 | #define OPT_LONG(s, l, v, h) { .type = OPTION_LONG, .short_name = (s), .long_name = (l), .value = check_vtype(v, long *), .help = (h) } | 136 | #define OPT_LONG(s, l, v, h) { .type = OPTION_LONG, .short_name = (s), .long_name = (l), .value = check_vtype(v, long *), .help = (h) } |
137 | #define OPT_ULONG(s, l, v, h) { .type = OPTION_ULONG, .short_name = (s), .long_name = (l), .value = check_vtype(v, unsigned long *), .help = (h) } | ||
136 | #define OPT_U64(s, l, v, h) { .type = OPTION_U64, .short_name = (s), .long_name = (l), .value = check_vtype(v, u64 *), .help = (h) } | 138 | #define OPT_U64(s, l, v, h) { .type = OPTION_U64, .short_name = (s), .long_name = (l), .value = check_vtype(v, u64 *), .help = (h) } |
137 | #define OPT_STRING(s, l, v, a, h) { .type = OPTION_STRING, .short_name = (s), .long_name = (l), .value = check_vtype(v, const char **), .argh = (a), .help = (h) } | 139 | #define OPT_STRING(s, l, v, a, h) { .type = OPTION_STRING, .short_name = (s), .long_name = (l), .value = check_vtype(v, const char **), .argh = (a), .help = (h) } |
138 | #define OPT_STRING_OPTARG(s, l, v, a, h, d) \ | 140 | #define OPT_STRING_OPTARG(s, l, v, a, h, d) \ |