diff options
Diffstat (limited to 'tools/perf/util/parse-options.c')
-rw-r--r-- | tools/perf/util/parse-options.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/parse-options.c b/tools/perf/util/parse-options.c index 79dfa0c34b3c..ed887642460c 100644 --- a/tools/perf/util/parse-options.c +++ b/tools/perf/util/parse-options.c | |||
@@ -49,6 +49,7 @@ static int get_value(struct parse_opt_ctx_t *p, | |||
49 | break; | 49 | break; |
50 | /* FALLTHROUGH */ | 50 | /* FALLTHROUGH */ |
51 | case OPTION_BOOLEAN: | 51 | case OPTION_BOOLEAN: |
52 | case OPTION_INCR: | ||
52 | case OPTION_BIT: | 53 | case OPTION_BIT: |
53 | case OPTION_SET_INT: | 54 | case OPTION_SET_INT: |
54 | case OPTION_SET_PTR: | 55 | case OPTION_SET_PTR: |
@@ -73,6 +74,10 @@ static int get_value(struct parse_opt_ctx_t *p, | |||
73 | return 0; | 74 | return 0; |
74 | 75 | ||
75 | case OPTION_BOOLEAN: | 76 | case OPTION_BOOLEAN: |
77 | *(bool *)opt->value = unset ? false : true; | ||
78 | return 0; | ||
79 | |||
80 | case OPTION_INCR: | ||
76 | *(int *)opt->value = unset ? 0 : *(int *)opt->value + 1; | 81 | *(int *)opt->value = unset ? 0 : *(int *)opt->value + 1; |
77 | return 0; | 82 | return 0; |
78 | 83 | ||
@@ -478,6 +483,7 @@ int usage_with_options_internal(const char * const *usagestr, | |||
478 | case OPTION_GROUP: | 483 | case OPTION_GROUP: |
479 | case OPTION_BIT: | 484 | case OPTION_BIT: |
480 | case OPTION_BOOLEAN: | 485 | case OPTION_BOOLEAN: |
486 | case OPTION_INCR: | ||
481 | case OPTION_SET_INT: | 487 | case OPTION_SET_INT: |
482 | case OPTION_SET_PTR: | 488 | case OPTION_SET_PTR: |
483 | case OPTION_LONG: | 489 | case OPTION_LONG: |