/packages/linux/patches/linux-3.1.4-003-no_dev_console.patch
http://github.com/OpenELEC/OpenELEC.tv · Patch · 20 lines · 18 code · 2 blank · 0 comment · 0 complexity · 00a334e29e5ae8b07f277e88020a0e1c MD5 · raw file
- diff -Naur linux-2.6.34-rc7/init/main.c linux-2.6.34-rc7.patch/init/main.c
- --- linux-2.6.34-rc7/init/main.c 2010-05-10 03:36:28.000000000 +0200
- +++ linux-2.6.34-rc7.patch/init/main.c 2010-05-15 12:28:34.767241760 +0200
- @@ -886,8 +886,14 @@
- 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");
- + char *console = "/dev_console";
- +
- + if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) {
- + sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1);
- + if (sys_open(console, O_RDWR, 0) < 0)
- + printk(KERN_WARNING "Warning: unable to open an initial console.\n");
- + sys_unlink(console);
- + }
-
- (void) sys_dup(0);
- (void) sys_dup(0);