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
63be850583
commit
d8c3341b93
@ -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…
x
Reference in New Issue
Block a user