Re: [PATCH] perf list: fix --raw-dump

From: David Ahern
Date: Wed Dec 11 2013 - 16:02:34 EST


This is a multi-part message in MIME format.On 12/11/13, 3:16 AM, Ramkumar Ramachandra wrote:
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.

Why not make raw_dump a proper argument?