diff options
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 4fc03ddb05f..ee3b9ba625c 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 | { |