diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-16 22:50:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-16 22:50:35 -0500 |
commit | 908cd2dabbfbbefb02f6b908a1188a62e685136a (patch) | |
tree | bea68faa1827e077c125a35b23fa41bec863b1df /net/core | |
parent | 5635c10d976716ef47ae441998aeae144c7e7387 (diff) |
net: use %pF for /proc/net/ptype
Technically, patch changes format for modules, but I think nobody cares.
-86dd :ipv6:ipv6_rcv+0x0
+86dd ipv6_rcv+0x0/0x400 [ipv6]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 31568b2068ac..e08c0fcd603b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -108,7 +108,6 @@ | |||
108 | #include <linux/init.h> | 108 | #include <linux/init.h> |
109 | #include <linux/kmod.h> | 109 | #include <linux/kmod.h> |
110 | #include <linux/module.h> | 110 | #include <linux/module.h> |
111 | #include <linux/kallsyms.h> | ||
112 | #include <linux/netpoll.h> | 111 | #include <linux/netpoll.h> |
113 | #include <linux/rcupdate.h> | 112 | #include <linux/rcupdate.h> |
114 | #include <linux/delay.h> | 113 | #include <linux/delay.h> |
@@ -2801,31 +2800,6 @@ static void ptype_seq_stop(struct seq_file *seq, void *v) | |||
2801 | rcu_read_unlock(); | 2800 | rcu_read_unlock(); |
2802 | } | 2801 | } |
2803 | 2802 | ||
2804 | static void ptype_seq_decode(struct seq_file *seq, void *sym) | ||
2805 | { | ||
2806 | #ifdef CONFIG_KALLSYMS | ||
2807 | unsigned long offset = 0, symsize; | ||
2808 | const char *symname; | ||
2809 | char *modname; | ||
2810 | char namebuf[128]; | ||
2811 | |||
2812 | symname = kallsyms_lookup((unsigned long)sym, &symsize, &offset, | ||
2813 | &modname, namebuf); | ||
2814 | |||
2815 | if (symname) { | ||
2816 | char *delim = ":"; | ||
2817 | |||
2818 | if (!modname) | ||
2819 | modname = delim = ""; | ||
2820 | seq_printf(seq, "%s%s%s%s+0x%lx", delim, modname, delim, | ||
2821 | symname, offset); | ||
2822 | return; | ||
2823 | } | ||
2824 | #endif | ||
2825 | |||
2826 | seq_printf(seq, "[%p]", sym); | ||
2827 | } | ||
2828 | |||
2829 | static int ptype_seq_show(struct seq_file *seq, void *v) | 2803 | static int ptype_seq_show(struct seq_file *seq, void *v) |
2830 | { | 2804 | { |
2831 | struct packet_type *pt = v; | 2805 | struct packet_type *pt = v; |
@@ -2838,10 +2812,8 @@ static int ptype_seq_show(struct seq_file *seq, void *v) | |||
2838 | else | 2812 | else |
2839 | seq_printf(seq, "%04x", ntohs(pt->type)); | 2813 | seq_printf(seq, "%04x", ntohs(pt->type)); |
2840 | 2814 | ||
2841 | seq_printf(seq, " %-8s ", | 2815 | seq_printf(seq, " %-8s %pF\n", |
2842 | pt->dev ? pt->dev->name : ""); | 2816 | pt->dev ? pt->dev->name : "", pt->func); |
2843 | ptype_seq_decode(seq, pt->func); | ||
2844 | seq_putc(seq, '\n'); | ||
2845 | } | 2817 | } |
2846 | 2818 | ||
2847 | return 0; | 2819 | return 0; |