While doing some debugging I found that I had something close to an all
or nothing option for debug output. ...and all was a LOT!
As a result I made the following changes to printk.h:
diff -ur freebios-010119.orig/src/include/printk.h
freebios-010119.devel/src/include/printk.h
--- freebios-010119.orig/src/include/printk.h Fri Dec 1 03:59:46 2000
+++ freebios-010119.devel/src/include/printk.h Fri Jan 19 14:48:57 2001
@@ -10,15 +10,23 @@
#define KERN_WARNING "<4>" /* warning conditions */
#define KERN_NOTICE "<5>" /* normal but significant condition */
#define KERN_INFO "<6>" /* informational */
-#define KERN_DEBUG "<7>" /* debug-level messages */
+#define KERN_VERBOSE "<7>" /* debug-level messages */
+#define KERN_DEBUG "<8>" /* debug-level messages */
+#define KERN_SPEW "<9>" /* debug-level messages */
extern int console_loglevel;
int printk(const char *fmt, ...);
#ifdef DEBUG
#define DBG(x...) printk(KERN_DEBUG x)
+#define DBG7(x...) printk(KERN_VERBOSE x)
+#define DBG8(x...) printk(KERN_DEBUG x)
+#define DBG9(x...) printk(KERN_SPEW x)
#else
#define DBG(x...)
+#define DBG7(x...)
+#define DBG8(x...)
+#define DBG9(x...)
#endif
#endif
I then went through the code and replaced most cases of DBG with one of
the other DBG? macros. Is this a change that is supported by others?
Or will people just hate me for submitting the patch?
As it stands now, level 6 provides next to nothing and level 7 blabs
about every PCI I/O operation and tons of other stuff.
Thanks!
Ty
--
Tyson D Sawyer iRobot Corporation
Senior Systems Engineer Real World Interface Div.
[EMAIL PROTECTED] Robots for the Real World
603-532-6900 ext 206 http://www.irobot.com