diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-07-19 12:35:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-07-19 12:35:07 -0700 |
commit | 92188b41f1394d5e4399fcb28c13a2933f255255 (patch) | |
tree | 6674a73d24a1f52073381524d74dea47d87f66d4 /tools/lib/subcmd/parse-options.c | |
parent | efb9666e900b6f8f079adb2ab18a7be266434cd3 (diff) | |
parent | 25d4e7f513d4f8afcf81cb6f00edf1248b0ff8fc (diff) |
Merge tag 'perf-tools-fixes-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into master
Pull perf tooling fixes from Arnaldo Carvalho de Melo:
- Update hashmap.h from libbpf and kvm.h from x86's kernel UAPI.
- Set opt->set in libsubcmd's OPT_CALLBACK_SET(). This fixes
'perf record --switch-output-event event-name' usage"
* tag 'perf-tools-fixes-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
tools arch kvm: Sync kvm headers with the kernel sources
perf tools: Sync hashmap.h with libbpf's
libsubcmd: Fix OPT_CALLBACK_SET()
Diffstat (limited to 'tools/lib/subcmd/parse-options.c')
-rw-r--r-- | tools/lib/subcmd/parse-options.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/subcmd/parse-options.c b/tools/lib/subcmd/parse-options.c index dbb9efbf718a..39ebf6192016 100644 --- a/tools/lib/subcmd/parse-options.c +++ b/tools/lib/subcmd/parse-options.c @@ -237,6 +237,9 @@ static int get_value(struct parse_opt_ctx_t *p, return err; case OPTION_CALLBACK: + if (opt->set) + *(bool *)opt->set = true; + if (unset) return (*opt->callback)(opt, NULL, 1) ? (-1) : 0; if (opt->flags & PARSE_OPT_NOARG) |