tools lib traceevent: Handle INVALID_ARG_TYPE errno in pevent_strerror
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 9 Nov 2012 18:50:33 +0000 (15:50 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 9 Nov 2012 20:35:31 +0000 (17:35 -0300)
gcc on f14 32-bit rightly complains:

   tools/lib/traceevent/event-parse.c:5097:2: error: enumeration value ‘PEVENT_ERRNO__INVALID_ARG_TYPE’ not handled in switch

The entry for it is in the error strings array pevent_error_str[]:

        _PE(INVALID_ARG_TYPE,   "invalid argument type")

It was just not being handled on the pevent_strerror switch, fix it.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-c68zkvxw4289uqbosfkz963g@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/event-parse.c

index 38d6595..669953a 100644 (file)
@@ -5101,6 +5101,7 @@ int pevent_strerror(struct pevent *pevent __maybe_unused,
        case PEVENT_ERRNO__READ_FORMAT_FAILED:
        case PEVENT_ERRNO__READ_PRINT_FAILED:
        case PEVENT_ERRNO__OLD_FTRACE_ARG_FAILED:
+       case PEVENT_ERRNO__INVALID_ARG_TYPE:
                snprintf(buf, buflen, "%s", msg);
                break;