summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-sched.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2015-10-25 00:49:27 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-10-27 09:28:44 -0300
commitc71183697250b356be6c7c1abc2e9a74073e1dca (patch)
tree704044c1c38f9f0da738712b807fb01f201d3e59 /tools/perf/builtin-sched.c
parent01b19455c08cc37d1c3ef174524278e84c92fec1 (diff)
downloadop-kernel-dev-c71183697250b356be6c7c1abc2e9a74073e1dca.zip
op-kernel-dev-c71183697250b356be6c7c1abc2e9a74073e1dca.tar.gz
perf tools: Introduce usage_with_options_msg()
Now usage_with_options() setup a pager before printing message so normal printf() or pr_err() will not be shown. The usage_with_options_msg() can be used to print some help message before usage strings. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1445701767-12731-4-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-sched.c')
-rw-r--r--tools/perf/builtin-sched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 3396261..0ee6d90 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -1728,8 +1728,8 @@ static void setup_sorting(struct perf_sched *sched, const struct option *options
for (tok = strtok_r(str, ", ", &tmp);
tok; tok = strtok_r(NULL, ", ", &tmp)) {
if (sort_dimension__add(tok, &sched->sort_list) < 0) {
- error("Unknown --sort key: `%s'", tok);
- usage_with_options(usage_msg, options);
+ usage_with_options_msg(usage_msg, options,
+ "Unknown --sort key: `%s'", tok);
}
}
OpenPOWER on IntegriCloud