diff options
Diffstat (limited to 'init/main.c')
-rw-r--r-- | init/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
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 |