summaryrefslogtreecommitdiff
path: root/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs.h')
-rw-r--r--fs.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs.h b/fs.h
index 56f0558..bc0805f 100644
--- a/fs.h
+++ b/fs.h
@@ -2,8 +2,8 @@
// Both the kernel and user programs use this header file.
-#define ROOTINO 1 // root i-number
-#define BSIZE 512 // block size
+#define ROOTINO 1 // root i-number
+#define BSIZE 1024 // block size
// Disk layout:
// [ boot block | super block | log | inode blocks |
@@ -48,7 +48,7 @@ struct dinode {
#define BPB (BSIZE*8)
// Block of free map containing bit for block b
-#define BBLOCK(b, sb) (b/BPB + sb.bmapstart)
+#define BBLOCK(b, sb) ((b)/BPB + sb.bmapstart)
// Directory is a file containing a sequence of dirent structures.
#define DIRSIZ 14