#ifndef __FS_SUPERBLOCK_H #define __FS_SUPERBLOCK_H #include #include "inode.h" enum sblock_err_t { SBLOCK_SUCCESS, SBLOCK_FAILURE }; /* * Detrompeur */ #define SUPERBLOCK_MAGIC 0xcafebabe #define SUPERBLOCK_LABEL_SIZE 32 struct superblock_desc_t { uint32_t magic_key; int serial; char label[SUPERBLOCK_LABEL_SIZE]; inode_t first_inode; uint32_t first_free_block; unsigned int free_space; }; void init_super(unsigned int volume); int load_super(unsigned int volume, struct superblock_desc_t *sblock); void save_super(unsigned int volume, struct superblock_desc_t *sblock); #endif /* __FS_SUPERBLOCK_H */