I thought about a macro trick:
// before including <linux/debug.h>, you define the 'dbg_printk()'
// group your file belongs to:
#define DBG_PRINTK_GRP buggy
// this creates a global variable. only if this variable is
// 1, then the dbg_printk()'s are actually printed.
// (or: 0:ignore, 1: special internal ring buffer, 2: syslog,...)
// this must be used in one file from the group.
#define DBG_PRINTK_GRP_INIT 2
#include <linux/debug.h>
advantages:
* more flexible than DEBUG_MODULE
* can be enabled at run time with a debugger.
-- Manfred
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/