LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   printk(KERN_DEBUG ...) vs printk(...) (http://www.linuxquestions.org/questions/linux-kernel-70/printk-kern_debug-vs-printk-540211/)

Sergei Lavrov 03-24-2007 12:15 PM

printk(KERN_DEBUG ...) vs printk(...)
 
What is difference between printk(KERN_DEBUG ...) and printk( ...) ?
After I replace the latter with the former, the kernel is not dumping debug messages anymore.

angryfirelord 03-25-2007 04:00 PM

Well, I know nothing about Kernel editing so I'll take a stab at it.

The KERN_DEBUG is telling printk to print only anything related to KERN_DEBUG whereas printk with no arguments will print everything.

Quakeboy02 03-25-2007 04:41 PM

From "Linux Device Drivers" by Corbet et al, page 77:
Quote:

A printk statement with no specified priority defaults to DEFAULT_MESSAGE_LOGLEVEL, specified in kernel/printk.c as an integer. In the 2.6.10 kernel, DEFAULT_MESSAGE_LOGLEVEL is KERN_WARNING, but that has been known to change in the past.
There's more. Buy the book. :)


All times are GMT -5. The time now is 08:30 AM.