Re: getty acting strange
In article <firstname.lastname@example.org>,
Russell Coker <email@example.com> wrote:
>I have two machines running the latest Debian/unstable that are having getty
>One machine is running 2.6.0-test11 and has gettys on VT's tty2, tty3, and
>tty4 failing with the message:
>"failed to query next available vt", this occurs from the following code in /
> if ((fd = open("/dev/console", O_WRONLY, 0) ) < 0 )
> error(_("/dev/console: cannot open: %m"));
> if ((ioctl(fd, VT_OPENQRY, &newvtno ) < 0))
> error(_("failed to query next available vt"));
Hmm, the code seems to be confusing /dev/tty0 and /dev/console.
They are not the same device, that changed years ago.
>Here's the relevant section of strace output:
>open("/dev/console", O_WRONLY|O_LARGEFILE) = 1
>ioctl(1, 0x5600, 0xbffff7c8) = -1 EINVAL (Invalid argument)
That makes sense, since /dev/tty0 is the master VTY device,
>ls -l /dev/console
>crw--w---- 1 root tty 5, 1 Dec 24 02:48 /dev/console
Indeed, new-style (if you can call 4 years old "new") console.
When life hands you lemons, grab the salt and pass the tequila.