diff options
author | Jason Baron <jbaron@redhat.com> | 2011-08-11 14:36:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-08-22 18:23:06 -0700 |
commit | ffa10cb47a94c9b456c83301c8047e2a898dd409 (patch) | |
tree | dd0fb674235c51d54fd80540420c23002795048e /lib | |
parent | ac0ac38f68be73b92dc390ceace50a0d143d76ae (diff) | |
download | linux-ffa10cb47a94c9b456c83301c8047e2a898dd409.tar.gz linux-ffa10cb47a94c9b456c83301c8047e2a898dd409.tar.bz2 linux-ffa10cb47a94c9b456c83301c8047e2a898dd409.zip |
dynamic_debug: make netdev_dbg() call __netdev_printk()
Previously, if dynamic debug was enabled netdev_dbg() was using
dynamic_dev_dbg() to print out the underlying msg. Fix this by making
sure netdev_dbg() uses __netdev_printk().
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dynamic_debug.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 4fc03ddb05f2..ee3b9ba625c5 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -33,6 +33,7 @@ #include <linux/hardirq.h> #include <linux/sched.h> #include <linux/device.h> +#include <linux/netdevice.h> extern struct _ddebug __start___verbose[]; extern struct _ddebug __stop___verbose[]; @@ -503,6 +504,30 @@ int __dynamic_dev_dbg(struct _ddebug *descriptor, } EXPORT_SYMBOL(__dynamic_dev_dbg); +int __dynamic_netdev_dbg(struct _ddebug *descriptor, + const struct net_device *dev, const char *fmt, ...) +{ + struct va_format vaf; + va_list args; + int res; + + BUG_ON(!descriptor); + BUG_ON(!fmt); + + va_start(args, fmt); + + vaf.fmt = fmt; + vaf.va = &args; + + res = dynamic_emit_prefix(descriptor); + res += __netdev_printk(KERN_CONT, dev, &vaf); + + va_end(args); + + return res; +} +EXPORT_SYMBOL(__dynamic_netdev_dbg); + static __initdata char ddebug_setup_string[1024]; static __init int ddebug_setup_query(char *str) { |