aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-03-18 21:22:54 -0400
committerJiri Olsa <jolsa@redhat.com>2014-04-14 06:55:00 -0400
commit9e9e5dfd86b9fdea8c75bae42cba052901b94f78 (patch)
treeef008be3e4fcb393e4324251e3e1ff310f76e1cf /tools/lib
parent3388cc3eb848154d0f2a0cd01542201d0d0fdad7 (diff)
tools lib traceevent: Do not call warning() directly
The patch 3a3ffa2e82205 ("tools lib traceevent: Report better error message on bad function args") added the error message but it seems there's no reason to call warning() directly. So change it to do_warning_event() to provide event information too. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1395192174-26273-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/traceevent/event-parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 33803c0b94d6..baec7d887da4 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -2742,14 +2742,16 @@ process_func_handler(struct event_format *event, struct pevent_function_handler
2742 type = process_arg(event, farg, &token); 2742 type = process_arg(event, farg, &token);
2743 if (i < (func->nr_args - 1)) { 2743 if (i < (func->nr_args - 1)) {
2744 if (type != EVENT_DELIM || strcmp(token, ",") != 0) { 2744 if (type != EVENT_DELIM || strcmp(token, ",") != 0) {
2745 warning("Error: function '%s()' expects %d arguments but event %s only uses %d", 2745 do_warning_event(event,
2746 "Error: function '%s()' expects %d arguments but event %s only uses %d",
2746 func->name, func->nr_args, 2747 func->name, func->nr_args,
2747 event->name, i + 1); 2748 event->name, i + 1);
2748 goto err; 2749 goto err;
2749 } 2750 }
2750 } else { 2751 } else {
2751 if (type != EVENT_DELIM || strcmp(token, ")") != 0) { 2752 if (type != EVENT_DELIM || strcmp(token, ")") != 0) {
2752 warning("Error: function '%s()' only expects %d arguments but event %s has more", 2753 do_warning_event(event,
2754 "Error: function '%s()' only expects %d arguments but event %s has more",
2753 func->name, func->nr_args, event->name); 2755 func->name, func->nr_args, event->name);
2754 goto err; 2756 goto err;
2755 } 2757 }