Implement a proper block layer with partition support.
[pintos-anon] / src / filesys / filesys.h
index 010510147d6d61dc42f5e876b93bb7b93d412eb0..c1cda84ecc324fbe70b4e9e3e729ed9ade89c24b 100644 (file)
@@ -4,20 +4,17 @@
 #include <stdbool.h>
 #include "filesys/off_t.h"
 
-/* Disk used for filesystem. */
-extern struct disk *filesys_disk;
+/* Sectors of system file inodes. */
+#define FREE_MAP_SECTOR 0       /* Free map file inode sector. */
+#define ROOT_DIR_SECTOR 1       /* Root directory file inode sector. */
 
-/* The free map file, opened by filesys_init() and never
-   closed. */
-extern struct file *free_map_file;
+/* Block device that contains the file system. */
+struct block *fs_device;
 
 void filesys_init (bool format);
+void filesys_done (void);
 bool filesys_create (const char *name, off_t initial_size);
 struct file *filesys_open (const char *name);
 bool filesys_remove (const char *name);
-bool filesys_list (void);
-bool filesys_dump (void);
-
-void filesys_self_test (void);
 
 #endif /* filesys/filesys.h */