From f30d0af6c422139ba388babd609fded86b830654 Mon Sep 17 00:00:00 2001 From: h2-addad <hamza2.addad@live.uwe.ac.uk> Date: Sun, 16 Jul 2023 01:05:26 +0000 Subject: [PATCH] Update --- src/filesys/filesys.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/filesys/filesys.h diff --git a/src/filesys/filesys.h b/src/filesys/filesys.h new file mode 100644 index 0000000..c1cda84 --- /dev/null +++ b/src/filesys/filesys.h @@ -0,0 +1,20 @@ +#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. */ + +/* Block device that contains the file system. */ +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/filesys.h */ -- GitLab