tools lib traceevent: Make pevent_filter_add_filter_str() return pevent_errno

Refactor the pevent_filter_add_filter_str() to return a proper error
code and get rid of the third error_str argument.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1386833777-3790-12-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Namhyung Kim
2013-12-12 16:36:14 +09:00
committed by Arnaldo Carvalho de Melo
parent 42d6194d13
commit 69c770a690
2 changed files with 27 additions and 59 deletions

View File

@@ -372,7 +372,8 @@ enum pevent_flag {
_PE(ILLEGAL_TOKEN, "illegal token"), \
_PE(INVALID_PAREN, "open parenthesis cannot come here"), \
_PE(UNBALANCED_PAREN, "unbalanced number of parenthesis"), \
_PE(UNKNOWN_TOKEN, "unknown token")
_PE(UNKNOWN_TOKEN, "unknown token"), \
_PE(FILTER_NOT_FOUND, "no filter found")
#undef _PE
#define _PE(__code, __str) PEVENT_ERRNO__ ## __code
@@ -863,9 +864,8 @@ enum filter_trivial_type {
FILTER_TRIVIAL_BOTH,
};
int pevent_filter_add_filter_str(struct event_filter *filter,
const char *filter_str,
char **error_str);
enum pevent_errno pevent_filter_add_filter_str(struct event_filter *filter,
const char *filter_str);
int pevent_filter_match(struct event_filter *filter,