aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/read.c
diff options
context:
space:
mode:
authorhpa <hpa>2004-11-23 23:43:02 +0000
committerhpa <hpa>2004-11-23 23:43:02 +0000
commit3eaa68f9163cc890dde3733b2dfa9ec0f774c360 (patch)
tree4d7743f5455bfe2a03eaf8734c6af50d22079ada /com32/lib/sys/read.c
parent123a1be461723ce4514ad45adf569a0fb2043f33 (diff)
downloadsyslinux-3eaa68f9163cc890dde3733b2dfa9ec0f774c360.tar.gz
syslinux-3eaa68f9163cc890dde3733b2dfa9ec0f774c360.tar.xz
syslinux-3eaa68f9163cc890dde3733b2dfa9ec0f774c360.zip
Split input and output sides of the device model
Diffstat (limited to 'com32/lib/sys/read.c')
-rw-r--r--com32/lib/sys/read.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/com32/lib/sys/read.c b/com32/lib/sys/read.c
index ea5fde32..e461cd46 100644
--- a/com32/lib/sys/read.c
+++ b/com32/lib/sys/read.c
@@ -43,15 +43,10 @@ ssize_t read(int fd, void *buf, size_t count)
{
struct file_info *fp = &__file_info[fd];
- if ( fd >= NFILES || !fp->ops ) {
+ if ( fd >= NFILES || !fp->iop ) {
errno = EBADF;
return -1;
}
- if ( __unlikely(!fp->ops->read) ) {
- errno = EINVAL;
- return -1;
- }
-
- return fp->ops->read(fp, buf, count);
+ return fp->iop->read(fp, buf, count);
}