perf kvm: introduce --list-cmds for use by scripts
authorRamkumar Ramachandra <artagnon@gmail.com>
Tue, 4 Mar 2014 01:26:36 +0000 (20:26 -0500)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 14 Mar 2014 21:08:41 +0000 (18:08 -0300)
commit09a71b97cce70551356b13b668aa1d7d6da84457
tree47f628218b6a436fe565484a0a65360cd72c162d
parent94a0793ddf7fa9890006a8dc203b985e7b120785
perf kvm: introduce --list-cmds for use by scripts

Introduce

  $ perf kvm --list-cmds

to dump a raw list of commands for use by the completion script. In
order to do this, introduce parse_options_subcommand() for handling
subcommands as a special case in the parse-options machinery.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: David Ahern <dsahern@gmail.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1393896396-10427-1-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-kvm.c
tools/perf/perf-completion.sh
tools/perf/util/parse-options.c
tools/perf/util/parse-options.h