From d844f0f9d955d9ddb2cb4cda1b0e544e7f9ed6ce Mon Sep 17 00:00:00 2001 From: rsc Date: Tue, 28 Aug 2007 17:49:49 +0000 Subject: 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. --- fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs.c') diff --git a/fs.c b/fs.c index 45ccdb2..732b721 100644 --- a/fs.c +++ b/fs.c @@ -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) -- cgit v1.2.3