[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 13:06:13 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218625
--- Comment #4 from Vladimir Kondratyev <vladimir at kondratyev.su> ---
(In reply to Jan Kokemüller from comment #3)
> I don't know if this is cuse specific behavior,
> or if FreeBSD in general behaves like this.
IOWINT ioctl passes int value in internal buffer and provide pointer to that
buffer to handler exactly like IOW(NNN, ###, int)
Following is IOWINT->IO convertor from webcamd internals, AFAIR, it is working:
/*
* Copy in the _IOWINT parameter and pass it as arg pointer
* similar to what Linux is doing:
*/
if ((cmd & IOC_DIRMASK) == IOC_VOID && IOCPARM_LEN(cmd) == sizeof(int))
{
if (copy_from_user(&iowint, arg, sizeof(iowint)) != 0) {
retval = -EFAULT;
goto done;
}
arg = (void *)(intptr_t)iowint;
}
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list