lkml.org 
[lkml]   [2008]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] make loglevel related commandline to early_param v2
[PATCH] make loglevel related commandline to early_param v2

so we can use them for early console like
console=uart8250,io,0x3f8,115200n8
earlycon=uart8250,io,0x3f8,115200n8
early_printk

otherwise printk(KERN_DEBUG "debug msg") will not print out to console even
"debug" command line is used.

andi point out early_param need to return 0 instead 1.

Ingo had another patch in x86.git to process ignore_loglevel

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>

diff --git a/init/main.c b/init/main.c
index cb81ed1..3741bda 100644
--- a/init/main.c
+++ b/init/main.c
@@ -232,30 +232,26 @@ EXPORT_SYMBOL(loops_per_jiffy);

static int __init debug_kernel(char *str)
{
- if (*str)
- return 0;
console_loglevel = 10;
- return 1;
+ return 0;
}

static int __init quiet_kernel(char *str)
{
- if (*str)
- return 0;
console_loglevel = 4;
- return 1;
+ return 0;
}

-__setup("debug", debug_kernel);
-__setup("quiet", quiet_kernel);
+early_param("debug", debug_kernel);
+early_param("quiet", quiet_kernel);

static int __init loglevel(char *str)
{
get_option(&str, &console_loglevel);
- return 1;
+ return 0;
}

-__setup("loglevel=", loglevel);
+early_param("loglevel", loglevel);

/*
* Unknown boot options get handed to init, unless they look like

\
 
 \ /
  Last update: 2008-02-01 20:31    [W:0.041 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site