Re: [PATCH xserver] xfree86: drop KDSKBMUTE handling

2018-04-06 Thread Adam Jackson
On Fri, 2018-04-06 at 12:28 +1000, Peter Hutterer wrote:
> 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 

Oh good, never did like that hack anyway. Merged, thanks:

remote: Updating patchwork state for 
https://patchwork.freedesktop.org/project/Xorg/list/
remote: E: failed to find patch for rev 
31c1489eeb8c5391cd978303989de167819f0041.
remote: I: 0 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   74aef564a7..31c1489eeb  master -> master

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver] xfree86: drop KDSKBMUTE handling

2018-04-05 Thread Peter Hutterer
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 
---
 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..a2464 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, _attr);
 SYSCALL(ioctl(xf86Info.consoleFd, KDGKBMODE, _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, _attr);
 
-- 
2.14.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel