[PATCH xserver] xfree86: drop KDSKBMUTE handling

Peter Hutterer peter.hutterer at who-t.net
Fri Apr 6 02:28:56 UTC 2018


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

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 hw/xfree86/os-support/linux/lnx_init.c | 26 ++++++++------------------
 1 file changed, 8 insertions(+), 18 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));
+                    FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n",
+                               strerror(errno));
 
-                    /* ... and drain events, else the kernel gets angry */
-                    xf86SetConsoleHandler(drain_console, NULL);
-                }
+                /* ... 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);
 
-- 
2.14.3



More information about the xorg-devel mailing list