[lkml]   [2009]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 2.6.32] ftrace: fix event format export
For some reason the export of the event print
format to userspace uses '#fmt' which breaks
if the format string is anything but a plain
string, for example if it is built with macros
then the macro names are exported instead of
their contents.

"\"%s\"", fmt
instead of
"%s", #fmt
to export the string and not the way it is built.

Signed-off-by: Johannes Berg <>
This is making the export of a bunch of events (only checked the
wireless ones but those are all affected) unusable, so please apply to

include/trace/ftrace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- wireless-testing.orig/include/trace/ftrace.h 2009-11-13 13:15:21.000000000 +0100
+++ wireless-testing/include/trace/ftrace.h 2009-11-13 13:34:03.000000000 +0100
@@ -159,7 +159,7 @@
#undef __get_str

#undef TP_printk
-#define TP_printk(fmt, args...) "%s, %s\n", #fmt, __stringify(args)
+#define TP_printk(fmt, args...) "\"%s\", %s\n", fmt, __stringify(args)

#undef TP_fast_assign
#define TP_fast_assign(args...) args

 \ /
  Last update: 2009-11-13 13:41    [W:0.362 / U:3.248 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site