provided code

This commit is contained in:
LabTS
2024-10-01 23:37:39 +01:00
commit 8724a2641e
697 changed files with 74252 additions and 0 deletions

20
src/filesys/filesys.h Normal file
View File

@@ -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. */
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/filesys.h */