X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffilesys%2Ffile.h;h=c28201d9b8b82022faf1e80671b5d366b01ec219;hb=993c1d9f4452e2edd851f3175dfdf317f18bdb9f;hp=ea716aae032ffb78353c37c7dfc67f4ca620b1ee;hpb=b6b1e6db07a20a0b3025c2ae62a58e80c1af841b;p=pintos-anon diff --git a/src/filesys/file.h b/src/filesys/file.h index ea716aa..c28201d 100644 --- a/src/filesys/file.h +++ b/src/filesys/file.h @@ -1,20 +1,11 @@ #ifndef FILESYS_FILE_H #define FILESYS_FILE_H -#include -#include #include #include "devices/disk.h" #include "filesys/off_t.h" -struct file - { - struct filehdr *hdr; - void *bounce; - off_t pos; - }; - -bool file_open (struct file *, disk_sector_t); +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_at (struct file *, void *, off_t size, off_t start); @@ -23,5 +14,6 @@ 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 *); +void file_remove (struct file *); #endif /* filesys/file.h */