chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df465b3
)
util: switch the console to text mode on reset
author
Michal Schmidt
<mschmidt@redhat.com>
Fri, 6 Jan 2012 00:32:34 +0000
(
01:32
+0100)
committer
Michal 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
patch
|
blob
|
history
diff --git
a/src/util.c
b/src/util.c
index 1cff54708bde44711f7402711e0044e75351bf3f..b4c5e2e65aaaef18d3c3212a39d7f20e440e7601 100644
(file)
--- 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);