diff options
author | Namhyung Kim | 2013-12-12 16:36:08 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo | 2013-12-13 10:30:22 -0300 |
commit | 605b8fda958a578e0a50ed1df3cac5a12f1fe8dc (patch) | |
tree | a28e668c0c22484a355b5707c8a9dd308c53d496 /tools/lib/traceevent/event-parse.h | |
parent | 91dfa49bdd8ef9600d850ef68ec892eb70824e3d (diff) |
tools lib traceevent: Get rid of malloc_or_die() in find_event()
Make it return pevent_errno to distinguish malloc allocation failure.
Since it'll be returned to user later, add more error code.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Reviewed-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/1386833777-3790-6-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/event-parse.h')
-rw-r--r-- | tools/lib/traceevent/event-parse.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h index 6e23f197175f..abdfd3c606ed 100644 --- a/tools/lib/traceevent/event-parse.h +++ b/tools/lib/traceevent/event-parse.h @@ -356,7 +356,9 @@ enum pevent_flag { _PE(READ_FORMAT_FAILED, "failed to read event format"), \ _PE(READ_PRINT_FAILED, "failed to read event print fmt"), \ _PE(OLD_FTRACE_ARG_FAILED,"failed to allocate field name for ftrace"),\ - _PE(INVALID_ARG_TYPE, "invalid argument type") + _PE(INVALID_ARG_TYPE, "invalid argument type"), \ + _PE(INVALID_EVENT_NAME, "invalid event name"), \ + _PE(EVENT_NOT_FOUND, "No event found") #undef _PE #define _PE(__code, __str) PEVENT_ERRNO__ ## __code |