commit | 553099857702bb77e541c47bde47f6863834d2e2 | [log] [tgz] |
---|---|---|
author | Namhyung Kim <[email protected]> | Wed Feb 06 14:57:16 2013 +0900 |
committer | Arnaldo Carvalho de Melo <[email protected]> | Wed Feb 06 18:09:26 2013 -0300 |
tree | fdc46d986f30efdbca79be57117330205b6c1ce3 | |
parent | 51f27d1440cede5a413d279a20b38767b6f85097 [diff] [blame] |
perf sort: Make setup_sorting returns an error code Currently the setup_sorting() is called for parsing sort keys and exits if it failed to add the sort key. As it's included in libperf it'd be better returning an error code rather than exiting application inside of the library. Signed-off-by: Namhyung Kim <[email protected]> Suggested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index dc870cf3..95a2ad3 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c
@@ -309,7 +309,8 @@ if (symbol__init() < 0) return -1; - setup_sorting(annotate_usage, options); + if (setup_sorting() < 0) + usage_with_options(annotate_usage, options); if (argc) { /*