Mercurial > hg > Members > innparusu > xv6-rpi
diff src/fs.c @ 33:7a63dacab7f8
fix cbc_read
author | mir3636 |
---|---|
date | Tue, 22 Jan 2019 17:32:06 +0900 |
parents | 96af12a50fdb |
children |
line wrap: on
line diff
--- a/src/fs.c Tue Jan 22 15:48:35 2019 +0900 +++ b/src/fs.c Tue Jan 22 17:32:06 2019 +0900 @@ -453,7 +453,7 @@ st->size = ip->size; } -__code cbc_readi (struct inode *ip, char *dst, uint off, uint n, struct file *f, __code (*next)(int ret)) +__code cbc_readi (struct inode *ip, char *dst, uint off, uint n, __code (*next)(int ret)) { uint tot, m; struct buf *bp; @@ -463,7 +463,7 @@ goto next(-1); } - goto cbc_devsw[ip->major].read(ip, dst, n, f, next); + goto cbc_devsw[ip->major].read(ip, dst, n, next); } if (off > ip->size || off + n < off) { @@ -481,10 +481,6 @@ brelse(bp); } - if (n > 0) - f->off += n; - iunlock(f->ip); - goto next(n); }