]> git.baikalelectronics.ru Git - kernel.git/commit
tools lib traceevent: Check for spaces in character array
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Fri, 1 Nov 2013 21:53:58 +0000 (17:53 -0400)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 4 Nov 2013 17:35:54 +0000 (14:35 -0300)
commit7c19afa40964dd05a24060a9aca9c5e315aae4c3
tree2bc13ecdaeab05e35dc4f8e5c2df8127802111b1
parent2c421378a52667d177922b65efd316dec8f651fc
tools lib traceevent: Check for spaces in character array

Currently when using the raw format for fields, when looking at a
character array, to determine if it is a string or not, we make sure all
characters are "isprint()". If not, then we consider it a numeric array,
and print the hex numbers of the characters instead.

But it seems that '\n' fails the isprint() check! Add isspace() to the
check as well, such that if all characters pass isprint() or isspace()
it will assume the character array is a string.

Reported-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Xenia Ragiadakou <burzalodowa@gmail.com>
Link: http://lkml.kernel.org/r/20131101215501.465091682@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/lib/traceevent/event-parse.c