X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=blobdiff_plain;f=src%2Ffilesys%2Ffilesys.h;h=c1cda84ecc324fbe70b4e9e3e729ed9ade89c24b;hp=4f31b7c1ce96d7d72288c4d6b91d1b5850d6acad;hb=a03618133f7df0954802a470a4bee7674f7aed45;hpb=2cf38a4ba2dd965c892767b0d8ee97e67f33b274 diff --git a/src/filesys/filesys.h b/src/filesys/filesys.h index 4f31b7c..c1cda84 100644 --- a/src/filesys/filesys.h +++ b/src/filesys/filesys.h @@ -1,19 +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" -#ifndef OFF_T -#define OFF_T -typedef int32_t off_t; -#endif +/* 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. */ +struct block *fs_device; -struct file; 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); -void filesys_list (void); - -void filesys_self_test (void); -#endif /* filesys.h */ +#endif /* filesys/filesys.h */