January 2018
Intermediate to advanced
456 pages
12h 49m
English
Linux drivers do not use the printk function directly. They use, in order of preference, subsystem-specific messages (such as netdev or v4l) or the dev_* and pr_* family of functions. The latter are described in the following table:
|
Device message |
Generic message |
Printk symbol |
|
dev_emerg |
pr_emerg |
KERN_EMERG |
|
dev_alert |
pr_alert |
KERN_ALERT |
|
dev_crit |
pr_crit |
KERN_CRIT |
|
dev_err |
pr_err |
KERN_ERR |
|
dev_warn |
pr_warn |
KERN_WARNING |
|
dev_notice |
pr_notice |
KERN_NOTICE |
|
dev_info |
pr_info |
KERN_INFO |
|
dev_dbg |
pr_debug |
KERN_DEBUG |
To enable the debug messages within a driver, you may do either of the following:
Read now
Unlock full access