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
This commit is contained in:
parent
d04e6601fa
commit
639af71ab1
@ -826,6 +826,10 @@ linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
|
||||
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() */
|
||||
|
Loading…
x
Reference in New Issue
Block a user