Created attachment 181754 [details] add an Evdev ioctl handler to the Linux compat layer I've added an Evdev ioctl handler to the Linux compat layer. This depends on the slightly changed definition of the EVIOCGRAB and EVIOCREVOKE ioctls (bug 218625). To test this I've built libevdev in a Ubuntu 16.04 VM and ran the programs from the "tools" folder. They work with Evdev devices created by evdevfbsd (at least on amd64, I didn't test i386).
Created attachment 181846 [details] add an Evdev ioctl handler to the Linux compat layer - v2 I've updated the patch. Some comments are clarified and EVIOCRMFF (which is another IOWINT ioctl like EVIOCGRAB and EVIOCREVOKE) is now also translated. Changing the definition of EVIOCGRAB and EVIOCREVOKE is not needed as I've learned (see bug 218625). EVIOCRMFF is untested as it's related to force feedback (unsupported on FreeBSD for now).
There are 3 more ioctls with directions defined in Linux and FreeBSD differently: ioctl Linux FreeBSD EVIOCGKEYCODE(2) _IOR _IOWR EVIOCGMASK _IOR _IOW They are not supported in in-kernel evdev driver yet, but should work in webcamd cuse-backed driver
A commit references this bug: Author: dchagin Date: Sun Apr 23 07:43:51 UTC 2017 New revision: 317323 URL: https://svnweb.freebsd.org/changeset/base/317323 Log: Add Evdev ioctl handler to the Linuxulator. PR: 218627 Submitted by: Jan Kokem?ller Reported by: Jan Kokem?ller MFC after: 1 week Changes: head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_ioctl.h
grab
A commit references this bug: Author: dchagin Date: Sun Apr 30 06:14:58 UTC 2017 New revision: 317602 URL: https://svnweb.freebsd.org/changeset/base/317602 Log: MFC r317323: Add Evdev ioctl handler to the Linuxulator. PR: 218627 Changes: _U stable/11/ stable/11/sys/compat/linux/linux_ioctl.c stable/11/sys/compat/linux/linux_ioctl.h