aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-19 12:20:38 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-19 15:57:55 -0400
commit5ef841f6f32dce0b752a4fa0622781ee67a0e874 (patch)
tree12c1ac0552f12b93662e2676137fb1286b50d4ee /kernel/trace/trace.c
parentac5f6c96859e9a664ac05b04bc96ed1caad5fe29 (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.c')
-rw-r--r--kernel/trace/trace.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8d981ababc45..c637cb687cf2 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1694,38 +1694,6 @@ static enum print_line_t print_hex_fmt(struct trace_iterator *iter)
1694 return TRACE_TYPE_HANDLED; 1694 return TRACE_TYPE_HANDLED;
1695} 1695}
1696 1696
1697static enum print_line_t print_bprintk_msg_only(struct trace_iterator *iter)
1698{
1699 struct trace_seq *s = &iter->seq;
1700 struct trace_entry *entry = iter->ent;
1701 struct bprint_entry *field;
1702 int ret;
1703
1704 trace_assign_type(field, entry);
1705
1706 ret = trace_seq_bprintf(s, field->fmt, field->buf);
1707 if (!ret)
1708 return TRACE_TYPE_PARTIAL_LINE;
1709
1710 return TRACE_TYPE_HANDLED;
1711}
1712
1713static enum print_line_t print_printk_msg_only(struct trace_iterator *iter)
1714{
1715 struct trace_seq *s = &iter->seq;
1716 struct trace_entry *entry = iter->ent;
1717 struct print_entry *field;
1718 int ret;
1719
1720 trace_assign_type(field, entry);
1721
1722 ret = trace_seq_printf(s, "%s", field->buf);
1723 if (!ret)
1724 return TRACE_TYPE_PARTIAL_LINE;
1725
1726 return TRACE_TYPE_HANDLED;
1727}
1728
1729static enum print_line_t print_bin_fmt(struct trace_iterator *iter) 1697static enum print_line_t print_bin_fmt(struct trace_iterator *iter)
1730{ 1698{
1731 struct trace_seq *s = &iter->seq; 1699 struct trace_seq *s = &iter->seq;
@@ -1787,12 +1755,12 @@ static enum print_line_t print_trace_line(struct trace_iterator *iter)
1787 if (iter->ent->type == TRACE_BPRINT && 1755 if (iter->ent->type == TRACE_BPRINT &&
1788 trace_flags & TRACE_ITER_PRINTK && 1756 trace_flags & TRACE_ITER_PRINTK &&
1789 trace_flags & TRACE_ITER_PRINTK_MSGONLY) 1757 trace_flags & TRACE_ITER_PRINTK_MSGONLY)
1790 return print_bprintk_msg_only(iter); 1758 return trace_print_bprintk_msg_only(iter);
1791 1759
1792 if (iter->ent->type == TRACE_PRINT && 1760 if (iter->ent->type == TRACE_PRINT &&
1793 trace_flags & TRACE_ITER_PRINTK && 1761 trace_flags & TRACE_ITER_PRINTK &&
1794 trace_flags & TRACE_ITER_PRINTK_MSGONLY) 1762 trace_flags & TRACE_ITER_PRINTK_MSGONLY)
1795 return print_printk_msg_only(iter); 1763 return trace_print_printk_msg_only(iter);
1796 1764
1797 if (trace_flags & TRACE_ITER_BIN) 1765 if (trace_flags & TRACE_ITER_BIN)
1798 return print_bin_fmt(iter); 1766 return print_bin_fmt(iter);