From: Ramkumar Ramachandra <artagnon@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH] perf list: fix --raw-dump
Date: Wed, 11 Dec 2013 15:46:20 +0530 [thread overview]
Message-ID: <1386756980-23121-1-git-send-email-artagnon@gmail.com> (raw)
While adding usage information, 44d742e (perf list: Add usage,
2013-10-30) broke
$ perf list --raw-dump
by asking parse_options() to stop at
non-option (PARSE_OPT_STOP_AT_NON_OPTION), hence parsing the option
--raw-dump and barfing. Ask it to keep unknown options
unparsed (PARSE_OPT_KEEP_UNKNOWN) so that we have a chance to handle it
later. The trade-off that this patch makes is that
$ perf list --foo
will not error out like it used to.
Fixes: 44d742e01e6d (perf list: Add usage)
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
I spotted this while trying to complete
$ perf record -e <TAB>
tools/perf/builtin-list.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 011195e..8b076f3 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -28,7 +28,7 @@ int cmd_list(int argc, const char **argv, const char *prefix __maybe_unused)
};
argc = parse_options(argc, argv, list_options, list_usage,
- PARSE_OPT_STOP_AT_NON_OPTION);
+ PARSE_OPT_KEEP_UNKNOWN);
setup_pager();
--
1.8.5.rc0.5.g70ebc73.dirty
next reply other threads:[~2013-12-11 10:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-11 10:16 Ramkumar Ramachandra [this message]
2013-12-11 21:02 ` David Ahern
2013-12-12 7:34 ` Ramkumar Ramachandra
2013-12-12 16:55 ` David Ahern
2013-12-16 13:19 ` Arnaldo Carvalho de Melo
2013-12-29 10:11 ` Ramkumar Ramachandra
2013-12-30 15:51 ` Dongsheng Yang
2013-12-16 16:07 ` Dongsheng Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1386756980-23121-1-git-send-email-artagnon@gmail.com \
--to=artagnon@gmail.com \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®