1 #undef PDEBUG 2 #ifdef HELLO_DEBUG 3 #define PDEBUG(fmt, args...) printk (KERN_DEBUG "hello: " fmt, ## args) 4 #else 5 #define PDEBUG(fmt, args...) 6 #endif
使用时,如果将#undef PDEBUG改为#define PDEBUG,程序中的打印语句就会打印出来。