README 1ST - New problem logging macros (2.5.38)
Quoted 8 lines · Larry Kessler
Quoted 6 lines · Jeff Garzik
Quoted 5 lines
} if (!request_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0), "eepro100")) {(quoted diff) +1
-1- printk (KERN_ERR "eepro100: cannot reserve MMIO region\n"); + pci_problem(LOG_ERR, pdev, "eepro100: cannot reserve MMIO region");
Quoted 6 lines
Quoted 1 line
bloat, no advantage over printk
the advantage is that the string, which means plenty to the developer, but possibly much less to a Sys Admin, can be replaced with a more descriptive message, in the local language, by editing the formatting template in user-space.
So, a static string passed to printk can't be translated, but a static string passed to pci_problem() can?
And in your view is it impossible to deduce a format string from the current code?
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
if (sum != 0xBABA)(quoted diff) +2
-3- printk(KERN_WARNING "%s: Invalid EEPROM checksum %#4.4x, " - "check settings before activating this device!\n", - dev->name, sum); + net_pci_problem(LOG_WARNING, dev, pdev, "Invalid EEPROM checksum, " + "check settings before activating this device!",
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
+
detail(checksum, "%#4.4x", sum));bloat, checksum is purely informational, and can be obtained through other means
indeed. See previous comment.
indeed :)
And for thinking outside the box, here's a random idea: when CONFIG_EVLOG is defined, printk() turns into a tagged format that spits out its format string, then a list of variable names and values. Given some C and cpp magic, that should be possible with no code changes at all to drivers.
An overriding objection to all this need of information. It is so wrong to decide to just continuing dump all information available, and hope that it will become useful. Decide which information is useful first...
Do you guys even have an idea what diagnostic info is useful from network drivers? from SCSI drivers? If yes, speak up. I would love to improve the diagnostics of my net drivers where possible. If not... please figure out the problem before implementing a solution.
Jeff