Commit 811cb50b authored by Johannes Berg's avatar Johannes Berg Committed by Steven Rostedt

tracing: 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.

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

For example, in net/mac80211/driver-trace.h for the trace event drv_start
there is:

        TP_printk(
                LOCAL_PR_FMT, LOCAL_PR_ARG
        )

Which use to produce:

 print fmt: LOCAL_PR_FMT, REC->wiphy_name

Now produces:

 print fmt: "%s", REC->wiphy_name
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
LKML-Reference: <20091113224009.GB23942@elte.hu>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent a646365c
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
#undef __get_str #undef __get_str
#undef TP_printk #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 #undef TP_fast_assign
#define TP_fast_assign(args...) args #define TP_fast_assign(args...) args
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment