tracing: Don't print an extra separator of flags
authorAndrey Vagin <avagin@openvz.org>
Sun, 19 Feb 2012 11:16:07 +0000 (14:16 +0300)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 21 Feb 2012 01:33:31 +0000 (20:33 -0500)
commite404b321dbb2d6e438522b7dce9c1d0c6a8c5275
tree1eff30273eb7089686e762ea2e1f025493c44c32
parent09bda4432a8a4d4db2b2b94697abc8d732a9ff73
tracing: Don't print an extra separator of flags

If __print_flags() is used after another __print_*() function, the
temp seq_file buffer will not be empty on entry, and the delimiter will
be printed even though there's just one field. We get something like:

|S

instead of just:

S

This is because the length of the temp seq buffer is used to determine
if the delimiter is printed or not. But this algorithm fails when
the seq buffer is not empty on entry, and the delimiter will be printed
because it thinks that a previous field was already printed.

Link: http://lkml.kernel.org/r/1329650167-480655-1-git-send-email-avagin@openvz.org
Signed-off-by: Andrew Vagin <avagin@openvz.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace_output.c