Author: hselasky Date: Thu Jun 1 09:53:55 2017 New Revision: 319410 URL: https://svnweb.freebsd.org/changeset/base/319410
Log: Translate the ERESTARTSYS error code into ERESTART in the LinuxKPI ioctl(), read() and write() system call handlers. This error code is internal to the kernel and should not be seen by user-space programs according to Linux. Submitted by: Yanko Yankulov <yanko.yanku...@gmail.com> 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 Thu Jun 1 09:34:51 2017 (r319409) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Thu Jun 1 09:53:55 2017 (r319410) @@ -854,6 +854,8 @@ linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t if (error == EWOULDBLOCK) linux_dev_kqfilter_poll(filp); + else if (error == ERESTARTSYS) + error = ERESTART; return (error); } @@ -889,6 +891,8 @@ linux_dev_read(struct cdev *dev, struct uio *uio, int error = -bytes; if (error == EWOULDBLOCK) linux_dev_kqfilter_poll(filp); + else if (error == ERESTARTSYS) + error = ERESTART; } } else error = ENXIO; @@ -928,6 +932,8 @@ linux_dev_write(struct cdev *dev, struct uio *uio, int error = -bytes; if (error == EWOULDBLOCK) linux_dev_kqfilter_poll(filp); + else if (error == ERESTARTSYS) + error = ERESTART; } } else error = ENXIO; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"