diff options
| author | klaar36 <klas.arvidsson@liu.se> | 2015-03-20 17:30:24 +0100 |
|---|---|---|
| committer | klaar36 <klas.arvidsson@liu.se> | 2015-03-20 17:30:24 +0100 |
| commit | e7bc50ca8ffcaa6ed68ebd2315f78b0f5a7d10ad (patch) | |
| tree | 4de97af7207676b69cb6a9aba8cb443cc134855d /src/filesys/filesys.h | |
| parent | b0418a24e709f0632d2ede5b0f327c422931939b (diff) | |
| download | pintos-rs-e7bc50ca8ffcaa6ed68ebd2315f78b0f5a7d10ad.tar.gz | |
Initial Pintos
Diffstat (limited to 'src/filesys/filesys.h')
| -rw-r--r-- | src/filesys/filesys.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/filesys/filesys.h b/src/filesys/filesys.h new file mode 100644 index 0000000..71efb16 --- /dev/null +++ b/src/filesys/filesys.h @@ -0,0 +1,23 @@ +#ifndef FILESYS_FILESYS_H +#define FILESYS_FILESYS_H + +#include <stdbool.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 file system. */ +extern struct disk *filesys_disk; + +void filesys_init (bool format); +void filesys_done (void); + +bool filesys_create (const char *name, off_t initial_size); +bool filesys_remove (const char *name); + +struct file *filesys_open (const char *name); +void filesys_close (struct file *file); + +#endif /* filesys/filesys.h */ |
