From d911d83ca1ff002f170f2c77975c1a6d705856a6 Mon Sep 17 00:00:00 2001
From: rsc <rsc>
Date: Fri, 8 Sep 2006 13:55:43 +0000
Subject: [PATCH] fix various comments

---
 fs.c   | 6 ------
 fs.h   | 4 ++--
 proc.c | 2 +-
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/fs.c b/fs.c
index f3d28c6..a1f0bf5 100644
--- a/fs.c
+++ b/fs.c
@@ -26,9 +26,6 @@
 // so we don't use spin locks.  Instead, if a process wants to use
 // a particular inode, it must sleep(ip) to wait for it to be not busy.
 // See iget below.
-//
-// XXX Inodes with dev == 0 exist only in memory.  They have no on-disk
-// representation.  This functionality is used to implement pipes.
 struct inode inode[NINODE];
 struct spinlock inode_table_lock;
 
@@ -362,7 +359,6 @@ iincref(struct inode *ip)
 }
 
 // Copy stat information from inode.
-// XXX Assumes inode is from disk file system.
 void
 stati(struct inode *ip, struct stat *st)
 {
@@ -376,7 +372,6 @@ stati(struct inode *ip, struct stat *st)
 #define min(a, b) ((a) < (b) ? (a) : (b))
 
 // Read data from inode.
-// XXX Assumes inode is from disk file system.
 int
 readi(struct inode *ip, char *dst, uint off, uint n)
 {
@@ -440,7 +435,6 @@ newblock(struct inode *ip, uint lbn)
 }
 
 // Write data to inode.
-// XXX Assumes inode is from disk file system.
 int
 writei(struct inode *ip, char *addr, uint off, uint n)
 {
diff --git a/fs.h b/fs.h
index 8687d16..241322b 100644
--- a/fs.h
+++ b/fs.h
@@ -9,8 +9,8 @@
 
 // File system super block
 struct superblock {
-  uint size;         // Size of file system (bytes???) xxx
-  uint nblocks;      // Number of blocks
+  uint size;         // Size of file system image (blocks)
+  uint nblocks;      // Number of data blocks
   uint ninodes;      // Number of inodes.
 };
 
diff --git a/proc.c b/proc.c
index e48f1ca..76549ae 100644
--- a/proc.c
+++ b/proc.c
@@ -38,7 +38,7 @@ setupsegs(struct proc *p)
   }
 
   c->gdt[0] = SEG_NULL;
-  c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0x100000 + 64*1024, 0); // xxx
+  c->gdt[SEG_KCODE] = SEG(STA_X|STA_R, 0, 0x100000 + 64*1024, 0);
   c->gdt[SEG_KDATA] = SEG(STA_W, 0, 0xffffffff, 0);
   c->gdt[SEG_TSS] = SEG16(STS_T32A, (uint) &c->ts, sizeof(c->ts), 0);
   c->gdt[SEG_TSS].s = 0;
-- 
GitLab