diff options
author | Frans Kaashoek <[email protected]> | 2015-06-27 13:38:03 -0400 |
---|---|---|
committer | Frans Kaashoek <[email protected]> | 2015-06-27 13:38:03 -0400 |
commit | b67ed0902dee5bca577ac85fae5c41cdc588bfce (patch) | |
tree | d2d27bc145c0a52ea8f2bb96375eddd8b768caa3 | |
parent | 8320d61be5613fb2875be859695752b1487fda20 (diff) | |
download | xv6-labs-b67ed0902dee5bca577ac85fae5c41cdc588bfce.tar.gz xv6-labs-b67ed0902dee5bca577ac85fae5c41cdc588bfce.tar.bz2 xv6-labs-b67ed0902dee5bca577ac85fae5c41cdc588bfce.zip |
Update memide to reflect recent changes to fs and buf
-rw-r--r-- | memide.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -9,6 +9,7 @@ #include "x86.h" #include "traps.h" #include "spinlock.h" +#include "fs.h" #include "buf.h" extern uchar _binary_fs_img_start[], _binary_fs_img_size[]; @@ -44,10 +45,10 @@ iderw(struct buf *b) panic("iderw: nothing to do"); if(b->dev != 1) panic("iderw: request not for disk 1"); - if(b->block >= disksize) + if(b->blockno >= disksize) panic("iderw: block out of range"); - p = memdisk + b->block*BSIZE; + p = memdisk + b->blockno*BSIZE; if(b->flags & B_DIRTY){ b->flags &= ~B_DIRTY; |