projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move most process destruction earlier.
[pintos-anon]
/
src
/
filesys
/
file.h
diff --git
a/src/filesys/file.h
b/src/filesys/file.h
index 689aa6df4878bb71f92568d7fbc0ceb5a4cc17b0..c28201d9b8b82022faf1e80671b5d366b01ec219 100644
(file)
--- a/
src/filesys/file.h
+++ b/
src/filesys/file.h
@@
-1,16
+1,19
@@
-#ifndef
HEADER
_FILE_H
-#define
HEADER_FILE_H 1
+#ifndef
FILESYS
_FILE_H
+#define
FILESYS_FILE_H
-#include <stdint.h>
#include <stddef.h>
#include <stddef.h>
+#include "devices/disk.h"
+#include "filesys/off_t.h"
-typedef int32_t off_t;
-
-struct file;
+struct file *file_open (disk_sector_t);
+void file_close (struct file *);
off_t file_read (struct file *, void *, off_t);
off_t file_read (struct file *, void *, off_t);
+off_t file_read_at (struct file *, void *, off_t size, off_t start);
off_t file_write (struct file *, const void *, off_t);
off_t file_write (struct file *, const void *, off_t);
+off_t file_write_at (struct file *, const void *, off_t size, off_t start);
off_t file_length (struct file *);
void file_seek (struct file *, off_t);
off_t file_tell (struct file *);
off_t file_length (struct file *);
void file_seek (struct file *, off_t);
off_t file_tell (struct file *);
+void file_remove (struct file *);
-#endif /* file.h */
+#endif /* file
sys/file
.h */