Commit 6a9dafd1 authored by matthias.kunze@gmx-topmail.de's avatar matthias.kunze@gmx-topmail.de Committed by Linus Torvalds

[PATCH] loglevel boot option

Add a boot-time option to set the loglevel.  We already have `quiet' and
`debug', which set it to specific levels.  This is better.  
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b921bc08
...@@ -634,6 +634,20 @@ running once the system is up. ...@@ -634,6 +634,20 @@ running once the system is up.
logibm.irq= [HW,MOUSE] Logitech Bus Mouse Driver logibm.irq= [HW,MOUSE] Logitech Bus Mouse Driver
Format: <irq> Format: <irq>
loglevel= All Kernel Messages with a loglevel smaller than the
console loglevel will be printed to the console. It can
also be changed with klogd or other programs. The
loglevels are defined as follows:
0 (KERN_EMERG) system is unusable
1 (KERN_ALERT) action must be taken immediately
2 (KERN_CRIT) critical conditions
3 (KERN_ERR) error conditions
4 (KERN_WARNING) warning conditions
5 (KERN_NOTICE) normal but significant condition
6 (KERN_INFO) informational
7 (KERN_DEBUG) debug-level messages
log_buf_len=n Sets the size of the printk ring buffer, in bytes. log_buf_len=n Sets the size of the printk ring buffer, in bytes.
Format is n, nk, nM. n must be a power of two. The Format is n, nk, nM. n must be a power of two. The
default is set in kernel config. default is set in kernel config.
......
...@@ -209,6 +209,14 @@ static int __init quiet_kernel(char *str) ...@@ -209,6 +209,14 @@ static int __init quiet_kernel(char *str)
__setup("debug", debug_kernel); __setup("debug", debug_kernel);
__setup("quiet", quiet_kernel); __setup("quiet", quiet_kernel);
static int __init loglevel(char *str)
{
get_option(&str, &console_loglevel);
return 1;
}
__setup("loglevel=", loglevel);
/* /*
* Unknown boot options get handed to init, unless they look like * Unknown boot options get handed to init, unless they look like
* failed parameters * failed parameters
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment