perf tools: Add option macro OPT_BOOLEAN_SET
[firefly-linux-kernel-4.4.55.git] / tools / perf / util / parse-options.c
index b6b39ff14fbb599f1402a8c56e136fda9cd25d25..d22e3f8017dc429a67458bc18457a6de7cd9f778 100644 (file)
@@ -78,6 +78,8 @@ static int get_value(struct parse_opt_ctx_t *p,
 
        case OPTION_BOOLEAN:
                *(bool *)opt->value = unset ? false : true;
+               if (opt->set)
+                       *(bool *)opt->set = true;
                return 0;
 
        case OPTION_INCR: