svn commit: r319500 - head/sys/compat/linuxkpi/common/src
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Jun 2 16:30:41 UTC 2017
Author: hselasky
Date: Fri Jun 2 16:30:40 2017
New Revision: 319500
URL: https://svnweb.freebsd.org/changeset/base/319500
Log:
Add support for setting the non-blocking I/O flag for LinuxKPI
character devices. In Linux the FIONBIO IOCTL is handled by the kernel
and not the drivers. Also need return success for the FIOASYNC ioctl
due to existing logic in kern_fcntl() even though it is not supported
currently.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/compat/linuxkpi/common/src/linux_compat.c
Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Jun 2 15:32:11 2017 (r319499)
+++ head/sys/compat/linuxkpi/common/src/linux_compat.c Fri Jun 2 16:30:40 2017 (r319500)
@@ -826,6 +826,10 @@ linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t
return (error);
filp->f_flags = file->f_flag;
+ /* the LinuxKPI supports blocking and non-blocking I/O */
+ if (cmd == FIONBIO || cmd == FIOASYNC)
+ return (0);
+
linux_set_current(td);
size = IOCPARM_LEN(cmd);
/* refer to logic in sys_ioctl() */
More information about the svn-src-head
mailing list