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.yankulov@gmail.com> MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
a6b28ee02a
commit
328c75d621
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319410
@ -854,6 +854,8 @@ linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag,
|
||||
|
||||
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 ioflag)
|
||||
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 ioflag)
|
||||
error = -bytes;
|
||||
if (error == EWOULDBLOCK)
|
||||
linux_dev_kqfilter_poll(filp);
|
||||
else if (error == ERESTARTSYS)
|
||||
error = ERESTART;
|
||||
}
|
||||
} else
|
||||
error = ENXIO;
|
||||
|
Loading…
Reference in New Issue
Block a user