chiark / gitweb /
util: switch the console to text mode on reset
authorMichal Schmidt <mschmidt@redhat.com>
Fri, 6 Jan 2012 00:32:34 +0000 (01:32 +0100)
committerMichal Schmidt <mschmidt@redhat.com>
Fri, 6 Jan 2012 00:34:02 +0000 (01:34 +0100)
In case we're taking over the console after a killed X server.

https://bugzilla.redhat.com/show_bug.cgi?id=771563

src/util.c

index 1cff54708bde44711f7402711e0044e75351bf3f..b4c5e2e65aaaef18d3c3212a39d7f20e440e7601 100644 (file)
@@ -2465,6 +2465,9 @@ int reset_terminal_fd(int fd) {
         /* Disable exclusive mode, just in case */
         ioctl(fd, TIOCNXCL);
 
+        /* Switch to text mode */
+        ioctl(fd, KDSETMODE, KD_TEXT);
+
         /* Enable console unicode mode */
         ioctl(fd, KDSKBMODE, K_UNICODE);