1 #ifndef HEADER_FILEHDR_H
2 #define HEADER_FILEHDR_H 1
9 #define DIRECT_CNT ((DISK_SECTOR_SIZE - sizeof (off_t) * 2) \
10 / sizeof (disk_sector_t))
16 disk_sector_t sectors[DIRECT_CNT];
20 struct filehdr *filehdr_allocate (struct bitmap *, off_t length);
21 void filehdr_deallocate (struct filehdr *, struct bitmap *);
22 struct filehdr *filehdr_read (disk_sector_t);
23 void filehdr_write (const struct filehdr *, disk_sector_t);
24 void filehdr_destroy (struct filehdr *);
25 disk_sector_t filehdr_byte_to_sector (const struct filehdr *, off_t);
26 off_t filehdr_length (const struct filehdr *);
27 void filehdr_print (const struct filehdr *);
29 #endif /* filehdr.h */