diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-03-19 12:20:38 -0400 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-03-19 15:57:55 -0400 |
commit | 5ef841f6f32dce0b752a4fa0622781ee67a0e874 (patch) | |
tree | 12c1ac0552f12b93662e2676137fb1286b50d4ee /kernel/trace/trace_output.c | |
parent | ac5f6c96859e9a664ac05b04bc96ed1caad5fe29 (diff) |
tracing: make print_(b)printk_msg_only global
This patch makes print_printk_msg_only and print_bprintk_msg_only
global for other functions to use. It also renames them by adding
a "trace_" to the beginning to avoid namespace collisions.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace_output.c')
-rw-r--r-- | kernel/trace/trace_output.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index 6a4c9dea191e..b45141748af5 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -19,6 +19,38 @@ static struct hlist_head event_hash[EVENT_HASHSIZE] __read_mostly; | |||
19 | 19 | ||
20 | static int next_event_type = __TRACE_LAST_TYPE + 1; | 20 | static int next_event_type = __TRACE_LAST_TYPE + 1; |
21 | 21 | ||
22 | enum print_line_t trace_print_bprintk_msg_only(struct trace_iterator *iter) | ||
23 | { | ||
24 | struct trace_seq *s = &iter->seq; | ||
25 | struct trace_entry *entry = iter->ent; | ||
26 | struct bprint_entry *field; | ||
27 | int ret; | ||
28 | |||
29 | trace_assign_type(field, entry); | ||
30 | |||
31 | ret = trace_seq_bprintf(s, field->fmt, field->buf); | ||
32 | if (!ret) | ||
33 | return TRACE_TYPE_PARTIAL_LINE; | ||
34 | |||
35 | return TRACE_TYPE_HANDLED; | ||
36 | } | ||
37 | |||
38 | enum print_line_t trace_print_printk_msg_only(struct trace_iterator *iter) | ||
39 | { | ||
40 | struct trace_seq *s = &iter->seq; | ||
41 | struct trace_entry *entry = iter->ent; | ||
42 | struct print_entry *field; | ||
43 | int ret; | ||
44 | |||
45 | trace_assign_type(field, entry); | ||
46 | |||
47 | ret = trace_seq_printf(s, "%s", field->buf); | ||
48 | if (!ret) | ||
49 | return TRACE_TYPE_PARTIAL_LINE; | ||
50 | |||
51 | return TRACE_TYPE_HANDLED; | ||
52 | } | ||
53 | |||
22 | /** | 54 | /** |
23 | * trace_seq_printf - sequence printing of trace information | 55 | * trace_seq_printf - sequence printing of trace information |
24 | * @s: trace sequence descriptor | 56 | * @s: trace sequence descriptor |