提交 b67ed090 创建 作者: Frans Kaashoek's avatar Frans Kaashoek

Update memide to reflect recent changes to fs and buf

上级 8320d61b
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "x86.h" #include "x86.h"
#include "traps.h" #include "traps.h"
#include "spinlock.h" #include "spinlock.h"
#include "fs.h"
#include "buf.h" #include "buf.h"
extern uchar _binary_fs_img_start[], _binary_fs_img_size[]; extern uchar _binary_fs_img_start[], _binary_fs_img_size[];
...@@ -44,10 +45,10 @@ iderw(struct buf *b) ...@@ -44,10 +45,10 @@ iderw(struct buf *b)
panic("iderw: nothing to do"); panic("iderw: nothing to do");
if(b->dev != 1) if(b->dev != 1)
panic("iderw: request not for disk 1"); panic("iderw: request not for disk 1");
if(b->block >= disksize) if(b->blockno >= disksize)
panic("iderw: block out of range"); panic("iderw: block out of range");
p = memdisk + b->block*BSIZE; p = memdisk + b->blockno*BSIZE;
if(b->flags & B_DIRTY){ if(b->flags & B_DIRTY){
b->flags &= ~B_DIRTY; b->flags &= ~B_DIRTY;
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论