diff options
author | Yinghai Lu <Yinghai.Lu@Sun.COM> | 2008-02-08 07:21:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:42 -0500 |
commit | f6f21c81464ce52dbeec921bdc2e8b288c491920 (patch) | |
tree | 926a0fdcf513218bcbfc6f021e03edc36cff58fa /init | |
parent | 06b2a76d25d3cfbd14680021c1d356c91be6904e (diff) |
Convert loglevel-related kernel boot parameters to early_param
So we can use them for the early console like console=uart8250 or
earlycon=uart8250 or early_printk
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/init/main.c b/init/main.c index ed9747f00ec4..c59859b85db0 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -238,22 +238,18 @@ EXPORT_SYMBOL(loops_per_jiffy); | |||
238 | 238 | ||
239 | static int __init debug_kernel(char *str) | 239 | static int __init debug_kernel(char *str) |
240 | { | 240 | { |
241 | if (*str) | ||
242 | return 0; | ||
243 | console_loglevel = 10; | 241 | console_loglevel = 10; |
244 | return 1; | 242 | return 0; |
245 | } | 243 | } |
246 | 244 | ||
247 | static int __init quiet_kernel(char *str) | 245 | static int __init quiet_kernel(char *str) |
248 | { | 246 | { |
249 | if (*str) | ||
250 | return 0; | ||
251 | console_loglevel = 4; | 247 | console_loglevel = 4; |
252 | return 1; | 248 | return 0; |
253 | } | 249 | } |
254 | 250 | ||
255 | __setup("debug", debug_kernel); | 251 | early_param("debug", debug_kernel); |
256 | __setup("quiet", quiet_kernel); | 252 | early_param("quiet", quiet_kernel); |
257 | 253 | ||
258 | static int __init loglevel(char *str) | 254 | static int __init loglevel(char *str) |
259 | { | 255 | { |
@@ -261,7 +257,7 @@ static int __init loglevel(char *str) | |||
261 | return 1; | 257 | return 1; |
262 | } | 258 | } |
263 | 259 | ||
264 | __setup("loglevel=", loglevel); | 260 | early_param("loglevel", loglevel); |
265 | 261 | ||
266 | /* | 262 | /* |
267 | * Unknown boot options get handed to init, unless they look like | 263 | * Unknown boot options get handed to init, unless they look like |