linux-next - tty_io.c change breaks /dev/console
At boot, all attempts to open /dev/console failed. dmesg shows:
Warning: unable to open an initial console.
from init/main.c:
if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
printk(KERN_WARNING "Warning: unable to open an initial console.\n");problem originally hit in -mmotm, traced down to linux-next. git bisect of linux-next find this:
31f8326f981117fc548d292656fa8dbed28bc42b is first bad commit commit 31f8326f981117fc548d292656fa8dbed28bc42b
Author: Alan Cox <[email protected]> Date: Thu Mar 12 10:00:15 2009 +1100
tty-fix-mismatch-in-lookup-han
The lookup methods return NULL or a pointer. The caller expects an ERR_PTR. It seems to make sense to just use NULL and return -ENODEV here as it keeps the code simple and clean and the way it always used to work (effectively) before the restructure
Problem noticed by Jiri Slaby.
:040000 040000 e6b1ddf54e63b5b7be2bfa07c6a21a9657e91d27 1ef01e18f00a713c3a0299725c6b594da5fcffbe M drivers
Reverting this one commit made things start working again. I admit not understanding why this commit broke the sys_open().