3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- xserver/hw/kdrive/linux/linux.c~devfs
7 +++ xserver/hw/kdrive/linux/linux.c
9 vtno = kdVirtualTerminal;
12 - if ((fd = open("/dev/tty0",O_WRONLY,0)) < 0)
13 + if ((fd = open("/dev/vc/0",O_WRONLY,0)) < 0)
16 - "LinuxInit: Cannot open /dev/tty0 (%s)\n",
17 + "LinuxInit: Cannot open /dev/tty/0 (%s)\n",
20 if ((ioctl(fd, VT_OPENQRY, &vtno) < 0) ||
25 - sprintf(vtname,"/dev/tty%d",vtno); /* /dev/tty1-64 */
26 + sprintf(vtname,"/dev/vc/%d",vtno); /* /dev/tty1-64 */
28 if ((LinuxConsoleFd = open(vtname, O_RDWR|O_NDELAY, 0)) < 0)
34 - LinuxCheckChown ("/dev/tty0");
35 + LinuxCheckChown ("/dev/vc/0");
37 * Linux doesn't switch to an active vt after the last close of a vt,
38 * so we do this ourselves by remembering which is active now.
42 close(LinuxConsoleFd); /* make the vt-manager happy */
43 - fd = open ("/dev/tty0", O_RDWR|O_NDELAY, 0);
44 + fd = open ("/dev/vc/0", O_RDWR|O_NDELAY, 0);
47 memset (&vts, '\0', sizeof (vts)); /* valgrind */