summaryrefslogtreecommitdiff
path: root/kernel/fs.c
diff options
context:
space:
mode:
authorRobert Morris <[email protected]>2019-06-13 10:29:27 -0400
committerRobert Morris <[email protected]>2019-06-13 10:29:27 -0400
commita8305b7318e66eb33e7789072e8b91dffa0e4b93 (patch)
tree080bae6010159b083d86411fcd05438e19ca5515 /kernel/fs.c
parent46744c4a13ec21e0818a49f31dbc3ad6ad592eed (diff)
downloadxv6-labs-a8305b7318e66eb33e7789072e8b91dffa0e4b93.tar.gz
xv6-labs-a8305b7318e66eb33e7789072e8b91dffa0e4b93.tar.bz2
xv6-labs-a8305b7318e66eb33e7789072e8b91dffa0e4b93.zip
FD_DEVICE
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)