summaryrefslogtreecommitdiff
path: root/kernel/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs.c')
-rw-r--r--kernel/fs.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/kernel/fs.c b/kernel/fs.c
index ebe377a..ebd8f7a 100644
--- a/kernel/fs.c
+++ b/kernel/fs.c
@@ -461,12 +461,6 @@ readi(struct inode *ip, int user_dst, uint64 dst, uint off, uint n)
uint tot, m;
struct buf *bp;
- if(ip->type == T_DEV){
- if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
- return -1;
- return devsw[ip->major].read(ip, user_dst, dst, n);
- }
-
if(off > ip->size || off + n < off)
return -1;
if(off + n > ip->size)
@@ -493,13 +487,6 @@ writei(struct inode *ip, int user_src, uint64 src, uint off, uint n)
uint tot, m;
struct buf *bp;
- if(ip->type == T_DEV){
- if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write){
- return -1;
- }
- return devsw[ip->major].write(ip, user_src, src, n);
- }
-
if(off > ip->size || off + n < off)
return -1;
if(off + n > MAXFILE*BSIZE)