]> git.baikalelectronics.ru Git - kernel.git/commit
tools lib traceevent: Introduce pevent_strerror
authorNamhyung Kim <namhyung.kim@lge.com>
Wed, 22 Aug 2012 07:00:30 +0000 (16:00 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 22 Aug 2012 19:03:39 +0000 (16:03 -0300)
commite1bec47297534efddc6a0d96ad7bfc434b90216c
treeb5f8181066874ece8cff95a5a0e8b18857cb5de7
parent7186064aad0b613c06f25022b5409f10f3c67905
tools lib traceevent: Introduce pevent_strerror

The pevent_strerror() sets @buf to a string that describes the
(libtraceevent-specific) error condition that is passed via @errnum.

This is similar to strerror_r() and does same thing if @errnum has a
standard errno value.

To sync error string with its code, define PEVENT_ERRORS with _PE()
macro and use it as suggested by Steven.

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: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1345618831-9148-4-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/event-parse.c
tools/lib/traceevent/event-parse.h