Date: Fri, 2 Jun 2017 16:30:40 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319500 - head/sys/compat/linuxkpi/common/src Message-ID: <201706021630.v52GUeTM016828@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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() */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706021630.v52GUeTM016828>