]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
linux: support EVIOCGRAB ioctl
authorMark Wielaard <mark@klomp.org>
Wed, 8 Jan 2025 15:52:03 +0000 (16:52 +0100)
committerMark Wielaard <mark@klomp.org>
Sun, 12 Jan 2025 23:18:22 +0000 (00:18 +0100)
EVIOCGRAB just takes an int argument.

https://bugs.kde.org/show_bug.cgi?id=498143

(cherry picked from commit 59eb5a4af60d4beb2c6910a1fa6cdf8d1f3a56f2)

NEWS
coregrind/m_syswrap/syswrap-linux.c
include/vki/vki-linux.h

diff --git a/NEWS b/NEWS
index 2fb8ce5c724b1759d44cc5d1fceb05dfcabaee92..7f9e005c59f4a64c821f74e9b6b77b9cae2473e0 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ The following bugs have been fixed or resolved on this branch.
 497130  Recognize new DWARF5 DW_LANG constants
 498317  FdBadUse is not a valid CoreError type in a suppression
         even though it's generated by --gen-suppressions=yes
+498143  False positive on EVIOCGRAB ioctl
 
 To see details of a given bug, visit
   https://bugs.kde.org/show_bug.cgi?id=XXXXXX
index 57672f167126d5a87f10adfe189d4c80ea5c03b9..87ab82e6e3424c60138f6e22479a82da25863236 100644 (file)
@@ -10397,6 +10397,10 @@ PRE(sys_ioctl)
       break;
    }
 
+   case VKI_EVIOCGRAB:
+       /* This just takes an int argument. */
+       break;
+
    default:
       /* EVIOC* are variable length and return size written on success */
       switch (ARG2 & ~(_VKI_IOC_SIZEMASK << _VKI_IOC_SIZESHIFT)) {
index 006f16d9220196744ca5df959b38f4b656d23d34..d4e1908e1e9c46dfe5aa863b5052f3d0ca9428d3 100644 (file)
@@ -3226,6 +3226,9 @@ struct vki_getcpu_cache {
 
 #define VKI_EVIOCGBIT(ev,len)  _VKI_IOC(_VKI_IOC_READ, 'E', 0x20 + ev, len)    /* get event bits */
 
+#define VKI_EVIOCGRAB          _VKI_IOW('E', 0x90, int)
+/* grab device */
+
 /*
  * Event types
  */