LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 12: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, 04:00 PM   #2
angryfirelord
Member
 
Registered: Dec 2005
Distribution: Fedora, CentOS
Posts: 515

Rep: Reputation: 66
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, 04:41 PM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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



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 10:44 AM
Using printk arunachalam Linux - Software 1 10-10-2005 03:07 PM
Regarding printk eshwar_ind Programming 0 11-23-2004 06:17 AM
printk: message ernobe Debian 4 11-20-2004 11:50 AM
printk or /proc unosoft Linux - Software 0 10-22-2003 04:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:10 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration