aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_printk.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-06-09 08:40:59 -0400
committerSteven Rostedt <rostedt@goodmis.org>2011-06-09 08:42:15 -0400
commitdb5e7ecc4abc91b9f26f0c0d79ef88a51e987d90 (patch)
tree022c475cc132e64f01c0765d2d965c0aa5df2286 /kernel/trace/trace_printk.c
parent5cf42f7055648aaba68ce95ecec69128d7fbf65f (diff)
tracing: Fix regression in printk_formats file
The fix to fix the printk_formats of modules broke the printk_formats of trace_printks in the kernel. The update of what to show via the seq_file was only updated if the passed in fmt was NULL, which happens only on the first iteration. The result was showing the first format every time instead of iterating through the available formats. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_printk.c')
-rw-r--r--kernel/trace/trace_printk.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/trace/trace_printk.c b/kernel/trace/trace_printk.c
index dff763b7baf1..1f06468a10d7 100644
--- a/kernel/trace/trace_printk.c
+++ b/kernel/trace/trace_printk.c
@@ -240,13 +240,10 @@ static const char **find_next(void *v, loff_t *pos)
240 const char **fmt = v; 240 const char **fmt = v;
241 int start_index; 241 int start_index;
242 242
243 if (!fmt)
244 fmt = __start___trace_bprintk_fmt + *pos;
245
246 start_index = __stop___trace_bprintk_fmt - __start___trace_bprintk_fmt; 243 start_index = __stop___trace_bprintk_fmt - __start___trace_bprintk_fmt;
247 244
248 if (*pos < start_index) 245 if (*pos < start_index)
249 return fmt; 246 return __start___trace_bprintk_fmt + *pos;
250 247
251 return find_next_mod_format(start_index, v, fmt, pos); 248 return find_next_mod_format(start_index, v, fmt, pos);
252} 249}