From 8baac760500980d4b83e8de2e90265bfaa19df13 Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Tue, 4 Jun 2019 05:57:47 -0400 Subject: support read() and write() bigger than one page --- fs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs.h') 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) -- cgit v1.2.3