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 21:23:06 -0400 |
commit | ffa10cb47a94c9b456c83301c8047e2a898dd409 (patch) | |
tree | dd0fb674235c51d54fd80540420c23002795048e /lib | |
parent | ac0ac38f68be73b92dc390ceace50a0d143d76ae (diff) |
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 @@ | |||
33 | #include <linux/hardirq.h> | 33 | #include <linux/hardirq.h> |
34 | #include <linux/sched.h> | 34 | #include <linux/sched.h> |
35 | #include <linux/device.h> | 35 | #include <linux/device.h> |
36 | #include <linux/netdevice.h> | ||
36 | 37 | ||
37 | extern struct _ddebug __start___verbose[]; | 38 | extern struct _ddebug __start___verbose[]; |
38 | extern struct _ddebug __stop___verbose[]; | 39 | extern struct _ddebug __stop___verbose[]; |
@@ -503,6 +504,30 @@ int __dynamic_dev_dbg(struct _ddebug *descriptor, | |||
503 | } | 504 | } |
504 | EXPORT_SYMBOL(__dynamic_dev_dbg); | 505 | EXPORT_SYMBOL(__dynamic_dev_dbg); |
505 | 506 | ||
507 | int __dynamic_netdev_dbg(struct _ddebug *descriptor, | ||
508 | const struct net_device *dev, const char *fmt, ...) | ||
509 | { | ||
510 | struct va_format vaf; | ||
511 | va_list args; | ||
512 | int res; | ||
513 | |||
514 | BUG_ON(!descriptor); | ||
515 | BUG_ON(!fmt); | ||
516 | |||
517 | va_start(args, fmt); | ||
518 | |||
519 | vaf.fmt = fmt; | ||
520 | vaf.va = &args; | ||
521 | |||
522 | res = dynamic_emit_prefix(descriptor); | ||
523 | res += __netdev_printk(KERN_CONT, dev, &vaf); | ||
524 | |||
525 | va_end(args); | ||
526 | |||
527 | return res; | ||
528 | } | ||
529 | EXPORT_SYMBOL(__dynamic_netdev_dbg); | ||
530 | |||
506 | static __initdata char ddebug_setup_string[1024]; | 531 | static __initdata char ddebug_setup_string[1024]; |
507 | static __init int ddebug_setup_query(char *str) | 532 | static __init int ddebug_setup_query(char *str) |
508 | { | 533 | { |