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() */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to