diff options
author | rsc <rsc> | 2007-08-28 17:49:49 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-08-28 17:49:49 +0000 |
commit | d844f0f9d955d9ddb2cb4cda1b0e544e7f9ed6ce (patch) | |
tree | dfb99c1e69fc384575852d3be10631889128028a /fs.c | |
parent | e3f271e88092683d1d1866ccffffce8528698f48 (diff) | |
download | xv6-labs-d844f0f9d955d9ddb2cb4cda1b0e544e7f9ed6ce.tar.gz xv6-labs-d844f0f9d955d9ddb2cb4cda1b0e544e7f9ed6ce.tar.bz2 xv6-labs-d844f0f9d955d9ddb2cb4cda1b0e544e7f9ed6ce.zip |
Change dev read/write functions
to take inode* instead of minor number.
Unlock console inode during console_read
and console_write. Otherwise background
processes cannot write to console while the
shell is reading it waiting for input.
Diffstat (limited to 'fs.c')
-rw-r--r-- | fs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -411,7 +411,7 @@ readi(struct inode *ip, char *dst, uint off, uint n) if(ip->type == T_DEV) { if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read) return -1; - return devsw[ip->major].read(ip->minor, dst, n); + return devsw[ip->major].read(ip, dst, n); } if(off > ip->size || off + n < off) @@ -439,7 +439,7 @@ writei(struct inode *ip, char *src, uint off, uint n) if(ip->type == T_DEV) { if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write) return -1; - return devsw[ip->major].write(ip->minor, src, n); + return devsw[ip->major].write(ip, src, n); } if(off + n < off) |