LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 03-24-2007, 01:15 PM   #1
Sergei Lavrov
LQ Newbie
 
Registered: Mar 2007
Posts: 1

Rep: Reputation: 0
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.
 
Old 03-25-2007, 05:00 PM   #2
angryfirelord
Member
 
Registered: Dec 2005
Posts: 502

Rep: Reputation: 60
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.
 
Old 03-25-2007, 05:41 PM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printk is not printing allomeen Programming 2 04-07-2006 11:44 AM
Using printk arunachalam Linux - Software 1 10-10-2005 04:07 PM
Regarding printk eshwar_ind Programming 0 11-23-2004 07:17 AM
printk: message ernobe Debian 4 11-20-2004 12:50 PM
printk or /proc unosoft Linux - Software 0 10-22-2003 05:05 PM


All times are GMT -5. The time now is 01:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration