While searching for techniques to debugging a Linux kernel, one of the ways is to use the dev_*() family functions.
These functions are defined in the /include/linux/device.h
file.
The function list is as below:
`dev_emerge()`<br>
`dev_alert()`<br>
`dev_crit()`<br>
`dev_err()`<br>
`dev_warning()`<br>
`dev_notice()`<br>
`dev_info()`<br>
I have already experimented with the pr_*()[pr_emerge()
, pr_alert()
, pr_crit()
...] family functions, which are similar to printk() in some way.
An experiment is done using simple kernel modules where I'm calling these functions. Furthermore I have also gone through a priority of messages displayed in syslog
and dmesg
(kernel ring buffer depending console_loglevel-a kernel variable).
But I'm unable to understand the use of dev_*() family. I mean, how do I use it in a program to debug kernel functionality?