1.
#define KERN_EMERG "<0>"
#define KERN_ALERT "<1>"
#define KERN_CRIT "<2>"
#define KERN_ERR "<3>"
#define KERN_WARNING "<4>"
#define KERN_NOTICE "<5>"
#define KERN_INFO "<6>"
#define KERN_DEBUG "<7>"
使用语法如下:
printk(KERN_WARNING "pwm_rfid: Couldn't register device!\n ");
2. '\r\n'问题
\r\n :window下,在Unix中只有"\n”
\r 是回车,return,将光标移到行首
\n 是换行,newline,将光标移到下一行的相同位置