diff options
Diffstat (limited to 'tools/perf/util/parse-options.c')
-rw-r--r-- | tools/perf/util/parse-options.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/util/parse-options.c b/tools/perf/util/parse-options.c index efebd5b476b3..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: |
@@ -500,6 +506,7 @@ int usage_with_options_internal(const char * const *usagestr, | |||
500 | void usage_with_options(const char * const *usagestr, | 506 | void usage_with_options(const char * const *usagestr, |
501 | const struct option *opts) | 507 | const struct option *opts) |
502 | { | 508 | { |
509 | exit_browser(false); | ||
503 | usage_with_options_internal(usagestr, opts, 0); | 510 | usage_with_options_internal(usagestr, opts, 0); |
504 | exit(129); | 511 | exit(129); |
505 | } | 512 | } |