diff options
author | hpa <hpa> | 2004-11-23 23:43:02 +0000 |
---|---|---|
committer | hpa <hpa> | 2004-11-23 23:43:02 +0000 |
commit | 3eaa68f9163cc890dde3733b2dfa9ec0f774c360 (patch) | |
tree | 4d7743f5455bfe2a03eaf8734c6af50d22079ada /com32/lib/sys/read.c | |
parent | 123a1be461723ce4514ad45adf569a0fb2043f33 (diff) | |
download | syslinux-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.c | 9 |
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); } |