Messages in this thread Patch in this message |  | | From | Dongsheng Yang <> | Subject | [PATCH 2/6] perf tools: Introduce an OPT_BOOLEAN_HIDEN in to parse-options.h. | Date | Thu, 12 Dec 2013 15:39:26 -0500 |
| |
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> --- tools/perf/util/parse-options.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/parse-options.h b/tools/perf/util/parse-options.h index cbf0149..f395a21a 100644 --- a/tools/perf/util/parse-options.h +++ b/tools/perf/util/parse-options.h @@ -84,7 +84,7 @@ typedef int parse_opt_cb(const struct option *, const char *arg, int unset); * CALLBACKS can use it like they want. * * `set`:: - * whether an option was set by the user + * whether an option was set by the user. */ struct option { enum parse_opt_type type; @@ -111,6 +111,8 @@ struct option { { .type = OPTION_BOOLEAN, .short_name = (s), .long_name = (l), \ .value = check_vtype(v, bool *), .help = (h), \ .set = check_vtype(os, bool *)} +#define OPT_BOOLEAN_HIDEN(s, l, v, h) \ + { .type = OPTION_BOOLEAN, .short_name = (s), .long_name = (l), .value = check_vtype(v, bool *), .flags = PARSE_OPT_HIDDEN, .help = (h)} #define OPT_INCR(s, l, v, h) { .type = OPTION_INCR, .short_name = (s), .long_name = (l), .value = check_vtype(v, int *), .help = (h) } #define OPT_SET_UINT(s, l, v, h, i) { .type = OPTION_SET_UINT, .short_name = (s), .long_name = (l), .value = check_vtype(v, unsigned int *), .help = (h), .defval = (i) } #define OPT_SET_PTR(s, l, v, h, p) { .type = OPTION_SET_PTR, .short_name = (s), .long_name = (l), .value = (v), .help = (h), .defval = (p) } -- 1.8.2.1
|  |