X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=init%2Fmain.c;fp=init%2Fmain.c;h=40aaa020cd6818b04986aacfe180bc5cac054353;hb=0f2cc4ecd81dc1917a041dc93db0ada28f8356fa;hp=18098153c33170c782309f6275cb7f936cdcf6b0;hpb=1fae4cfb97302289bb5df6a8195eb28385d0b002;p=pandora-kernel.git diff --git a/init/main.c b/init/main.c index 18098153c331..40aaa020cd68 100644 --- a/init/main.c +++ b/init/main.c @@ -822,11 +822,6 @@ static noinline int init_post(void) system_state = SYSTEM_RUNNING; numa_default_policy(); - if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) - printk(KERN_WARNING "Warning: unable to open an initial console.\n"); - - (void) sys_dup(0); - (void) sys_dup(0); current->signal->flags |= SIGNAL_UNKILLABLE; @@ -889,6 +884,12 @@ static int __init kernel_init(void * unused) do_basic_setup(); + /* Open the /dev/console on the rootfs, this should never fail */ + if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) + printk(KERN_WARNING "Warning: unable to open an initial console.\n"); + + (void) sys_dup(0); + (void) sys_dup(0); /* * check if there is an early userspace init. If yes, let it do all * the work