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
This commit is contained in:
Michal Schmidt 2012-01-06 01:32:34 +01:00
parent df465b3f44
commit 5c0100a537

View 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);