summaryrefslogtreecommitdiff
path: root/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs.h')
-rw-r--r--fs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs.h b/fs.h
index 3214f1d..56f0558 100644
--- a/fs.h
+++ b/fs.h
@@ -12,6 +12,7 @@
// mkfs computes the super block and builds an initial file system. The
// super block describes the disk layout:
struct superblock {
+ uint magic; // Must be FSMAGIC
uint size; // Size of file system image (blocks)
uint nblocks; // Number of data blocks
uint ninodes; // Number of inodes.
@@ -21,6 +22,8 @@ struct superblock {
uint bmapstart; // Block number of first free map block
};
+#define FSMAGIC 0x10203040
+
#define NDIRECT 12
#define NINDIRECT (BSIZE / sizeof(uint))
#define MAXFILE (NDIRECT + NINDIRECT)