aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-25 10:08:27 -0500
committerJohannes Berg <johannes@sipsolutions.net>2009-11-25 10:08:27 -0500
commitcaaf5c925977c2c29df8e624a46771bf715c2d7c (patch)
treeefabae614cf1efc5c9d1bc2370c893846973a926
parent1074d79e65eef6580983bd06703364036e94d98d (diff)
move trailing newline into trace-read
The seq buffer filled by pevent_print_event could overflow, and in that case we still want the output to have a newline at the end. Therefore, change the API to not include it in the printed buffer and output it manually. Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
-rw-r--r--parse-events.c1
-rw-r--r--trace-read.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/parse-events.c b/parse-events.c
index 48f29d3..74c5aa9 100644
--- a/parse-events.c
+++ b/parse-events.c
@@ -3280,7 +3280,6 @@ void pevent_print_event(struct trace_seq *s,
3280 event->handler(s, data, size, event); 3280 event->handler(s, data, size, event);
3281 else 3281 else
3282 pretty_print(s, data, size, event); 3282 pretty_print(s, data, size, event);
3283 trace_seq_putc(s, '\n');
3284} 3283}
3285 3284
3286static void print_fields(struct trace_seq *s, struct print_flag_sym *field) 3285static void print_fields(struct trace_seq *s, struct print_flag_sym *field)
diff --git a/trace-read.c b/trace-read.c
index 3f76833..9be0817 100644
--- a/trace-read.c
+++ b/trace-read.c
@@ -611,6 +611,7 @@ static void show_data(int cpu)
611 trace_seq_init(&s); 611 trace_seq_init(&s);
612 pevent_print_event(&s, cpu, record->data, record->size, record->ts); 612 pevent_print_event(&s, cpu, record->data, record->size, record->ts);
613 trace_seq_do_printf(&s); 613 trace_seq_do_printf(&s);
614 printf("\n");
614 615
615 free(record); 616 free(record);
616} 617}