summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorJesper Juhl <juhl-lkml@dif.dk>2005-03-13 00:36:44 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-13 00:36:44 -0800
commit5547e08ae38428be3625a4703438a29b8bfcd29b (patch)
treeb4e38f25de970f49a1cc264477b2ad25d58f26fd /init
parent0ba9025ad036d8cf9c38f505df7a8fe4675fc839 (diff)
[PATCH] Make loglevels in init/main.c a little more sane.
This patch modifies a few of the printk() loglevels used in init/main.c in an attempt to make them a bit more appropriate. The default loglevel is KERN_WARNING, but a few printk's without explicit loglevel are not (in my oppinion) warnings, so add proper warning levels - for instance; telling the user how many CPU's were brought up is hardly a warning, make it KERN_INFO instead. The initial printing of linux_banner is not a warning condition, I'd say it's more of a NOTICE or even INFO condition - I've made it KERN_NOTICE just as the printing of the kernel command line. A few printk's without explicit loglevel do match the default one, but I've made them explicit (the default could change in the future, and if it does then explicitly setting the proper loglevel is a nice thing). Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/init/main.c b/init/main.c
index 0cd4d6137d49..4d493a2d96b9 100644
--- a/init/main.c
+++ b/init/main.c
@@ -356,7 +356,7 @@ static void __init smp_init(void)
}
/* Any cleanup work */
- printk("Brought up %ld CPUs\n", (long)num_online_cpus());
+ printk(KERN_INFO "Brought up %ld CPUs\n", (long)num_online_cpus());
smp_cpus_done(max_cpus);
#if 0
/* Get other processors into their bootup holding patterns. */
@@ -432,6 +432,7 @@ asmlinkage void __init start_kernel(void)
*/
lock_kernel();
page_address_init();
+ printk(KERN_NOTICE);
printk(linux_banner);
setup_arch(&command_line);
setup_per_cpu_areas();
@@ -455,7 +456,7 @@ asmlinkage void __init start_kernel(void)
preempt_disable();
build_all_zonelists();
page_alloc_init();
- printk("Kernel command line: %s\n", saved_command_line);
+ printk(KERN_NOTICE "Kernel command line: %s\n", saved_command_line);
parse_early_param();
parse_args("Booting kernel", command_line, __start___param,
__stop___param - __start___param,
@@ -565,7 +566,7 @@ static void __init do_initcalls(void)
local_irq_enable();
}
if (msg) {
- printk("error in initcall at 0x%p: "
+ printk(KERN_WARNING "error in initcall at 0x%p: "
"returned with %s\n", *call, msg);
}
}
@@ -689,7 +690,7 @@ static int init(void * unused)
numa_default_policy();
if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
- printk("Warning: unable to open an initial console.\n");
+ printk(KERN_WARNING "Warning: unable to open an initial console.\n");
(void) sys_dup(0);
(void) sys_dup(0);