Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
printing_debugging [2018/09/25 13:21] – [Defining macros] rpjdayprinting_debugging [2018/09/25 13:27] (current) – [__netdev_printk()] rpjday
Line 265: Line 265:
 EXPORT_SYMBOL(netdev_printk); EXPORT_SYMBOL(netdev_printk);
 </code> </code>
 +
 +==== __netdev_printk() ====
 +
 +<code>
 +static void __netdev_printk(const char *level, const struct net_device *dev,
 +                            struct va_format *vaf)
 +{
 +        if (dev && dev->dev.parent) {
 +                dev_printk_emit(level[1] - '0',
 +                                dev->dev.parent,
 +                                "%s %s %s%s: %pV",
 +                                dev_driver_string(dev->dev.parent),
 +                                dev_name(dev->dev.parent),
 +                                netdev_name(dev), netdev_reg_state(dev),
 +                                vaf);
 +        } else if (dev) {
 +                printk("%s%s%s: %pV",
 +                       level, netdev_name(dev), netdev_reg_state(dev), vaf);
 +        } else {
 +                printk("%s(NULL net_device): %pV", level, vaf);
 +        }
 +}
 +</code>
 +
 +===== Dynamic debugging =====
 +
 +... coming ...
  • printing_debugging.1537881694.txt.gz
  • Last modified: 2018/09/25 13:21
  • by rpjday