diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-02-07 15:05:19 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-02-07 15:06:55 -0500 |
commit | 2712f99c32061de9e4f69b7faa988d26d81beb18 (patch) | |
tree | 195d3a858caf61da5a37b528769c4b920d77b919 | |
parent | 2d2ff551ebfd79d855ba042a03296483cb4a541c (diff) |
trace-cmd: Do not print double \n
When trace_printk or trace_marker is used, it may end with a '\n'.
Do not print out a double '\n'. If the user wants two '\n' then the
trace_printk or trace_marker should specify two.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | trace-read.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/trace-read.c b/trace-read.c index 37a7bc4..d87a89d 100644 --- a/trace-read.c +++ b/trace-read.c | |||
@@ -491,6 +491,8 @@ static void show_data(struct tracecmd_input *handle, | |||
491 | trace_seq_printf(&s, "CPU:%d [EVENTS DROPPED]\n", | 491 | trace_seq_printf(&s, "CPU:%d [EVENTS DROPPED]\n", |
492 | record->cpu); | 492 | record->cpu); |
493 | pevent_print_event(pevent, &s, record); | 493 | pevent_print_event(pevent, &s, record); |
494 | if (s.len && *(s.buffer + s.len - 1) == '\n') | ||
495 | s.len--; | ||
494 | trace_seq_do_printf(&s); | 496 | trace_seq_do_printf(&s); |
495 | trace_seq_destroy(&s); | 497 | trace_seq_destroy(&s); |
496 | 498 | ||