tracing: Fix event format export
commit7847a351aaaa21696dd07f412c493786b53a1999
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 13 Nov 2009 22:40:09 +0000 (13 23:40 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 18 Dec 2009 22:05:16 +0000 (18 14:05 -0800)
tree630c3235c1387098e301e1cadde427b2ed17ccae
parente75a313897fa83be86afb38a6e4415e923cdca80
tracing: Fix event format export

commit 811cb50baf63461ce0bdb234927046131fc7fa8b upstream.

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: Johannes Berg <johannes@sipsolutions.net>
LKML-Reference: <20091113224009.GB23942@elte.hu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/trace/ftrace.h