]> Devi Nivas Git - cs3210-lab0.git/commitdiff
Update memide to reflect recent changes to fs and buf
authorFrans Kaashoek <kaashoek@mit.edu>
Sat, 27 Jun 2015 17:38:03 +0000 (13:38 -0400)
committerFrans Kaashoek <kaashoek@mit.edu>
Sat, 27 Jun 2015 17:38:03 +0000 (13:38 -0400)
memide.c

index 2e09e339cc530e9ca70ca38729fa048b87507dcc..91b7f92a3d1ff0b26f5421cc71777de1ea775bc2 100644 (file)
--- a/memide.c
+++ b/memide.c
@@ -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;