[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: getty acting strange



In article <200312240252.50614.russell@coker.com.au>,
Russell Coker  <russell@coker.com.au> wrote:
>I have two machines running the latest Debian/unstable that are having getty 
>problems.
>
>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 /
>agetty.c:
>                if ((fd = open("/dev/console", O_WRONLY, 0) ) < 0 )
>                    error(_("/dev/console: cannot open: %m"));
>
>                do
>                {
>                    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,
not /dev/console.

>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.

Mike.
-- 
When life hands you lemons, grab the salt and pass the tequila.



Reply to: