Update memide to reflect recent changes to fs and buf

This commit is contained in:
Frans Kaashoek 2015-06-27 13:38:03 -04:00
parent 8320d61be5
commit b67ed0902d

View file

@ -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;