00001 #ifndef FILESYS_FILESYS_H 00002 //89982562164107 00003 #define FILESYS_FILESYS_H 00004 00005 #include <stdbool.h> 00006 #include "filesys/off_t.h" 00007 00008 /* Sectors of system file inodes. */ 00009 #define FREE_MAP_SECTOR 0 /* Free map file inode sector. */ 00010 #define ROOT_DIR_SECTOR 1 /* Root directory file inode sector. */ 00011 00012 /* Block device that contains the file system. */ 00013 struct block *fs_device; 00014 00015 void filesys_init (bool format); 00016 void filesys_done (void); 00017 bool filesys_create (const char *name, off_t initial_size); 00018 struct file *filesys_open (const char *name); 00019 bool filesys_remove (const char *name); 00020 00021 #endif /* filesys/filesys.h */