X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=inline;f=src%2Ffilesys%2Ffilesys.h;h=e87cbea5646933256e05b61f679f34d441b46e04;hb=52c038240d5fa59e4ac230e5fc7587aec328e5d3;hp=1f06c34bcf878144161b0de9645a455eef28367d;hpb=97dcefb4742e13df9eb22c3aa00bb802bdc55c60;p=pintos-anon diff --git a/src/filesys/filesys.h b/src/filesys/filesys.h index 1f06c34..e87cbea 100644 --- a/src/filesys/filesys.h +++ b/src/filesys/filesys.h @@ -1,21 +1,24 @@ -#ifndef HEADER_FILESYS_H -#define HEADER_FILESYS_H 1 +#ifndef FILESYS_FILESYS_H +#define FILESYS_FILESYS_H #include -#include -#include "off_t.h" +#include "filesys/off_t.h" + +/* 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 filesystem. */ 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); -bool filesys_open (const char *name, struct file *); +struct file *filesys_open (const char *name); bool filesys_remove (const char *name); +bool filesys_chdir (const char *name); bool filesys_list (void); -bool filesys_dump (void); void filesys_self_test (void); -#endif /* filesys.h */ +#endif /* filesys/filesys.h */