Mercurial > hg > Members > anatofuz > CbC_xv6
comparison src/fs.c @ 32:96af12a50fdb
fix cbc_read
author | mir3636 |
---|---|
date | Tue, 22 Jan 2019 15:48:35 +0900 |
parents | 96a5833d0d82 |
children | 7a63dacab7f8 |
comparison
equal
deleted
inserted
replaced
31:96a5833d0d82 | 32:96af12a50fdb |
---|---|
479 m = min(n - tot, BSIZE - off%BSIZE); | 479 m = min(n - tot, BSIZE - off%BSIZE); |
480 memmove(dst, bp->data + off % BSIZE, m); | 480 memmove(dst, bp->data + off % BSIZE, m); |
481 brelse(bp); | 481 brelse(bp); |
482 } | 482 } |
483 | 483 |
484 if (n > 0) | |
485 f->off += n; | |
486 iunlock(f->ip); | |
487 | |
484 goto next(n); | 488 goto next(n); |
485 } | 489 } |
486 | 490 |
487 //PAGEBREAK! | 491 //PAGEBREAK! |
488 // Read data from inode. | 492 // Read data from inode. |