From 3eaa68f9163cc890dde3733b2dfa9ec0f774c360 Mon Sep 17 00:00:00 2001 From: hpa Date: Tue, 23 Nov 2004 23:43:02 +0000 Subject: Split input and output sides of the device model --- com32/lib/sys/read.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'com32/lib/sys/read.c') 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); } -- cgit