aboutsummaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/main.c')
-rw-r--r--init/main.c11
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)
822 system_state = SYSTEM_RUNNING; 822 system_state = SYSTEM_RUNNING;
823 numa_default_policy(); 823 numa_default_policy();
824 824
825 if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
826 printk(KERN_WARNING "Warning: unable to open an initial console.\n");
827
828 (void) sys_dup(0);
829 (void) sys_dup(0);
830 825
831 current->signal->flags |= SIGNAL_UNKILLABLE; 826 current->signal->flags |= SIGNAL_UNKILLABLE;
832 827
@@ -889,6 +884,12 @@ static int __init kernel_init(void * unused)
889 884
890 do_basic_setup(); 885 do_basic_setup();
891 886
887 /* Open the /dev/console on the rootfs, this should never fail */
888 if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
889 printk(KERN_WARNING "Warning: unable to open an initial console.\n");
890
891 (void) sys_dup(0);
892 (void) sys_dup(0);
892 /* 893 /*
893 * check if there is an early userspace init. If yes, let it do all 894 * check if there is an early userspace init. If yes, let it do all
894 * the work 895 * the work