File system project updates:
[pintos-anon] / src / filesys / filesys.h
index 3de5f85d7b1f4446e5635cdcc160242010dd9d73..caef83c45c17f4986a3fc8838769a64d7a1e7606 100644 (file)
@@ -1,20 +1,20 @@
-#ifndef HEADER_FILESYS_H
-#define HEADER_FILESYS_H 1
+#ifndef FILESYS_FILESYS_H
+#define FILESYS_FILESYS_H
 
 #include <stdbool.h>
-#include <stdint.h>
+#include "filesys/off_t.h"
 
-#ifndef OFF_T
-#define OFF_T
-typedef int32_t off_t;
-#endif
+/* 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. */
+
+/* Disk used for file system. */
+extern struct disk *filesys_disk;
 
-struct file;
 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);
-void filesys_list (void);
-
-void filesys_self_test (void);
 
-#endif /* filesys.h */
+#endif /* filesys/filesys.h */