Driver porting: hello world
Driver porting: hello world
Posted Jul 28, 2004 9:28 UTC (Wed) by PsychoJamin (guest, #23518)In reply to: Driver porting: hello world by littertiger
Parent article: Driver porting: hello world
KERN_INFO is part of a macro defined in <linux/kernel.h>
It replaces the need for <0> .. <7> in printk messages which specifies the priority of the message. Where 0 is the highest priority and 7 is the lowest.
As these are macros there is no need for a ',' between it ans the rest of the printk parameter. ie printk(KERN_INFO "Hello\n"); not printk(KERN_INFO, "Hello\n");
The definietions are as follows:
#define KERN_EMERG "<0>" /* system is unusable */
#define KERN_ALERT "<1>" /* action must be taken immediately */
#define KERN_CRIT "<2>" /* critical conditions */
#define KERN_ERR "<3>" /* error conditions */
#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 */
