summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/linux/lnx_init.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2018-04-06 12:28:56 +1000
committerAdam Jackson <ajax@redhat.com>2018-04-06 13:21:00 -0400
commit31c1489eeb8c5391cd978303989de167819f0041 (patch)
treeceebf9622dbc31569afd254122ae0b2f94a0c833 /hw/xfree86/os-support/linux/lnx_init.c
parent74aef564a7faea4410e92fa606216ab877b0d452 (diff)
xfree86: drop KDSKBMUTE handling
This was never merged upstream. It was a Fedora kernel patch but dropped from Fedora in 2013 with kernel 3.12. The reason for the KDSKBMUTE proposal has been fixed in systemd in Feb 2013, systemd 198. https://lists.freedesktop.org/archives/systemd-devel/2013-February/008795.html Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/xfree86/os-support/linux/lnx_init.c')
-rw-r--r--hw/xfree86/os-support/linux/lnx_init.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 9e5ddcd50..a00002464 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -46,10 +46,6 @@
#define K_OFF 0x4
#endif
-#ifndef KDSKBMUTE
-#define KDSKBMUTE 0x4B51
-#endif
-
static Bool KeepTty = FALSE;
static int activeVT = -1;
@@ -262,23 +258,18 @@ xf86OpenConsole(void)
tcgetattr(xf86Info.consoleFd, &tty_attr);
SYSCALL(ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode));
- /* disable kernel special keys and buffering, new style */
- SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMUTE, 1));
+ /* disable kernel special keys and buffering */
+ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_OFF));
if (ret < 0)
{
- /* disable kernel special keys and buffering, old style */
- SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_OFF));
+ /* fine, just disable special keys */
+ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW));
if (ret < 0)
- {
- /* fine, just disable special keys */
- SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW));
- if (ret < 0)
- FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
- strerror(errno));
-
- /* ... and drain events, else the kernel gets angry */
- xf86SetConsoleHandler(drain_console, NULL);
- }
+ FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
+ strerror(errno));
+
+ /* ... and drain events, else the kernel gets angry */
+ xf86SetConsoleHandler(drain_console, NULL);
}
nTty = tty_attr;
@@ -327,7 +318,6 @@ xf86CloseConsole(void)
xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n",
strerror(errno));
- SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMUTE, 0));
SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode));
tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);