Working filesystem.
[pintos-anon] / src / filesys / file.h
index d165e80bf427123fcd41f1634e5de9cbf117a9b6..b29ce33a5a488bb15c513a25f998a8e323535988 100644 (file)
@@ -1,22 +1,20 @@
 #ifndef HEADER_FILE_H
 #define HEADER_FILE_H 1
 
+#include <stdbool.h>
 #include <stdint.h>
 #include <stddef.h>
-
-#ifndef OFF_T
-#define OFF_T
-typedef int32_t off_t;
-#endif
+#include "disk.h"
+#include "off_t.h"
 
 struct file 
   {
     struct filehdr *hdr;
+    void *bounce;
     off_t pos;
   };
 
-bool file_open (struct file *, const char *name);
-bool file_open_sector (struct file *, disk_sector_no);
+bool file_open (struct file *, disk_sector_no);
 void file_close (struct file *);
 off_t file_read (struct file *, void *, off_t);
 off_t file_read_at (struct file *, void *, off_t size, off_t start);