Messages in this thread | | | Date | Tue, 5 Oct 2004 16:30:52 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] Console: fall back to /dev/null when no console is availlable |
| |
Jörn Engel <joern@wohnheim.fh-wedel.de> wrote: > > --- linux-2.6.8cow/init/main.c~console 2004-10-05 20:46:40.000000000 +0200 > +++ linux-2.6.8cow/init/main.c 2004-10-05 20:46:08.000000000 +0200 > @@ -695,8 +695,11 @@ > system_state = SYSTEM_RUNNING; > numa_default_policy(); > > - if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) > + if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) { > printk("Warning: unable to open an initial console.\n"); > + if (open("/dev/null", O_RDWR, 0) == 0) > + printk(" Falling back to /dev/null.\n"); > + } > > (void) sys_dup(0); > (void) sys_dup(0);
/usr/src/25/init/main.c:183: undefined reference to `open'
I assume this worked for you because it's against 2.6.8 and we were still supporting kernel syscalls then.
Please always test patches against current kernels.
I'll fix it up. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |