[pkg-fso-maint] Bug#538640: nodm: getvt.c: VT_GETSTATE failed on /dev/console: Invalid argument
Timo Lindfors
lindi at kurp.hut.fi
Sat Jul 25 23:54:06 UTC 2009
Package: nodm
Version: 0.5-1
Severity: normal
Disclamer: getvt.c is not actually part of nodm but I am reporting the
bug against it since I don't want to endanger my system by running
nodm on it just yet ;-)
Steps to reproduce:
1) do not pass console=tty0 to kernel
2) do not start any gettys for ttys (modify inittab)
3) sudo ./getvt
Expected results:
3) getvt prints that it opened a tty, e.g.
Console opened
VT_GETSTATE succeeded
VT 1: busy
VT 2: busy
Got VT /dev/tty3
VT /dev/tty3 opened with fd 4
Actual results:
3) getvt fails with
VT_GETSTATE failed on /dev/console: Invalid argument
More info:
1) Qi is hardcoded to pass console=tty0 which makes it difficult to
reproduce this bug.
2) openvt works in this case. It seems to do
open("/dev/tty", O_RDWR) = 3
ioctl(3, KDGKBTYPE, 0xbe8cd73f) = -1 EINVAL (Invalid argument)
close(3) = 0
open("/dev/tty0", O_RDWR) = 3
ioctl(3, KDGKBTYPE, 0xbe8cd73f) = 0
ioctl(3, VT_GETSTATE, 0xbe8cd796) = 0
ioctl(3, VIDIOC_QUERYCAP or VT_OPENQRY, 0xbe8cd79c) = 0
close(3) = 0
open("/dev/vc/2", O_RDWR) = -1 ENOENT (No such file or directory)
open("/dev/tty2", O_RDWR) = 3
close(3) = 0
access("/dev/tty2", R_OK|W_OK) = 0
geteuid32() = 0
getuid32() = 0
getgid32() = 0
chown32("/dev/tty2", 0, 0) = 0
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=fi_FI (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
More information about the pkg-fso-maint
mailing list