diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-01-06 01:32:34 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2012-01-06 01:34:02 +0100 |
commit | 5c0100a53772eb7f4b11db7b071fc63e82e5a1a7 (patch) | |
tree | b9b58be0c25bc2eb5df22c47f9c21a57fcd24a50 /src/util.c | |
parent | df465b3f4419b6ba2e12bf9a5f7d7bde5a0c3531 (diff) |
util: switch the console to text mode on reset
In case we're taking over the console after a killed X server.
https://bugzilla.redhat.com/show_bug.cgi?id=771563
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c index 1cff54708b..b4c5e2e65a 100644 --- a/src/util.c +++ b/src/util.c @@ -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); |