X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ffilesys%2Ffilesys.h;h=455ac7274a08e15abd0749efe3446842d48f8032;hb=520ff4dd2a106a4d4a21468a72ba820c8ea7d242;hp=6f1e387c14429066484d9b02e558e20462d68dfb;hpb=8256dc4ff8f7c0a1f76c2d3a601b92d67aa8acfe;p=pintos-anon diff --git a/src/filesys/filesys.h b/src/filesys/filesys.h index 6f1e387..455ac72 100644 --- a/src/filesys/filesys.h +++ b/src/filesys/filesys.h @@ -1,11 +1,20 @@ -#ifndef HEADER_FILESYS_H -#define HEADER_FILESYS_H 1 +#ifndef FILESYS_FILESYS_H +#define FILESYS_FILESYS_H #include +#include "filesys/off_t.h" -void filesys_init (bool reformat); -bool filesys_create (const char *name); +/* 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. */ + +/* Block device that contains the file system. */ +extern struct block *fs_device; + +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); -#endif /* filesys.h */ +#endif /* filesys/filesys.h */