lkml.org 
[lkml]   [2013]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/6] perf tools: Introduce an OPT_BOOLEAN_HIDEN in to parse-options.h.
Date
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


\
 
 \ /
  Last update: 2013-12-12 09:01    [W:0.063 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site