]> Devi Nivas Git - cs3210-lab0.git/commitdiff
comment nits
authorrtm <rtm>
Fri, 24 Aug 2007 19:52:49 +0000 (19:52 +0000)
committerrtm <rtm>
Fri, 24 Aug 2007 19:52:49 +0000 (19:52 +0000)
fs.h
fsvar.h
ide.c

diff --git a/fs.h b/fs.h
index 9517326b7f6d18fd29b8d30f994ca88f3d26e386..e1cc7a288c16e13a681fa09d2b949da920fffd3b 100644 (file)
--- a/fs.h
+++ b/fs.h
@@ -1,5 +1,5 @@
 // On-disk file system format. 
-// This header is shared between kernel and user space.
+// Both the kernel and user programs use this header file.
 
 // Block 0 is unused.
 // Block 1 is super block.
diff --git a/fsvar.h b/fsvar.h
index f823c66f80bad8676dee9e3b2fab866d13fa37dc..07dbf5393803ee62a1c80d16f482a2216a0b1582 100644 (file)
--- a/fsvar.h
+++ b/fsvar.h
@@ -4,7 +4,7 @@ struct inode {
   uint dev;           // Device number
   uint inum;          // Inode number
   int ref;            // Reference count
-  int flags;           // I_BUSY, I_VALID
+  int flags;          // I_BUSY, I_VALID
 
   short type;         // copy of disk inode
   short major;
diff --git a/ide.c b/ide.c
index d5fa6ddeab17e5d851b70d61d9547a81ad687a0b..3b3b808db8c3ecd7c115566f51fb3adf61ae76f8 100644 (file)
--- a/ide.c
+++ b/ide.c
 #define IDE_CMD_READ  0x20
 #define IDE_CMD_WRITE 0x30
 
-// IDE request queue.
 // ide_queue points to the buf now being read/written to the disk.
 // ide_queue->qnext points to the next buf to be processed.
-// Must hold ide_lock while manipulating queue.
+// You must hold ide_lock while manipulating queue.
 
 static struct spinlock ide_lock;
 static struct buf *ide_queue;
@@ -84,7 +83,6 @@ ide_intr(void)
 {
   acquire(&ide_lock);
   if(ide_queue){
-    //cprintf("intr %x\n", ide_queue);
     if((ide_queue->flags & B_WRITE) == 0)
       if(ide_wait_ready(1) >= 0)
         insl(0x1F0, ide_queue->data, 512/4);
@@ -105,7 +103,6 @@ ide_start_request (void)
 {
   if(ide_queue){
     ide_wait_ready(0);
-    //cprintf("start %x\n", ide_queue);
     outb(0x3f6, 0);  // generate interrupt
     outb(0x1F2, 1);  // number of sectors
     outb(0x1F3, ide_queue->sector & 0xFF);
@@ -139,8 +136,6 @@ ide_rw(struct buf *b)
   b->done = 0;
   b->qnext = 0;
 
-  // cprintf("enqueue %x %x\n", b, ide_queue);
-
   // append b to ide_queue
   pp = &ide_queue;
   while(*pp)