[Bug 218625] [PATCH] Evdev ioctls EVIOCGRAB and EVIOCREVOKE don't work together with cuse

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Apr 17 12:48:13 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218625

--- Comment #3 from Jan Kokemüller <jan.kokemueller at gmail.com> ---
(In reply to Vladimir Kondratyev from comment #2)

This doesn't fix the issue, sadly.

With the current definition of EVIOCGRAB, when you do something like this on a
cuse-based Evdev device:

ioctl(dev->fd, EVIOCGRAB, (void *)1);  /* grab device */
ioctl(dev->fd, EVIOCGRAB, (void *)0);  /* ungrab device */

...both times you get 10000 (CUSE_BUF_MIN_PTR) inside the ioctl handler. So you
cannot ungrab a device again. The value 10000 comes from here:
https://github.com/freebsd/freebsd/blob/master/sys/fs/cuse/cuse.c#L1676

I don't know if this is cuse specific behavior, or if FreeBSD in general
behaves like this.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list