mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
perf probe: Warn when more than one line are given
Check multiple --lines option and print warning informing that only the first specified --line option is valid. Changes from the 1st post: - Accept only the first option instead of the last. - Fix warning message according to David's comment. - Mark as a bugfix. Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Pekka Enberg <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/20110811110253.19900.96192.stgit@fedora15 Signed-off-by: Masami Hiramatsu <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
36c0c588b9
commit
13e27d7686
1 changed files with 11 additions and 3 deletions
|
|
@ -134,10 +134,18 @@ static int opt_show_lines(const struct option *opt __used,
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
if (str)
|
||||
ret = parse_line_range_desc(str, ¶ms.line_range);
|
||||
INIT_LIST_HEAD(¶ms.line_range.line_list);
|
||||
if (!str)
|
||||
return 0;
|
||||
|
||||
if (params.show_lines) {
|
||||
pr_warning("Warning: more than one --line options are"
|
||||
" detected. Only the first one is valid.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
params.show_lines = true;
|
||||
ret = parse_line_range_desc(str, ¶ms.line_range);
|
||||
INIT_LIST_HEAD(¶ms.line_range.line_list);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue