From: Michal Schmidt Date: Fri, 6 Jan 2012 00:32:34 +0000 (+0100) Subject: util: switch the console to text mode on reset X-Git-Tag: v38~36 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c0100a53772eb7f4b11db7b071fc63e82e5a1a7;p=systemd 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 --- diff --git a/src/util.c b/src/util.c index 1cff5470..b4c5e2e6 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);