mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
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>
This commit is contained in:
parent
ac0ac38f68
commit
ffa10cb47a
4 changed files with 48 additions and 3 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue