FreeCalypso > hg > freecalypso-tools
comparison ffstools/tiffs-mkfs/struct.h @ 705:12ae93940467
tiffs-mkfs program written, compiles
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Wed, 20 May 2020 06:55:58 +0000 |
| parents | |
| children | 178ed445021d |
comparison
equal
deleted
inserted
replaced
| 704:dacd9fdc392a | 705:12ae93940467 |
|---|---|
| 1 /* some general limits */ | |
| 2 #define MAX_FN_COMPONENT 20 | |
| 3 #define MAX_DIR_NEST 6 | |
| 4 #define MAX_DIR_ENTRIES 128 | |
| 5 | |
| 6 /* tree of content to be written */ | |
| 7 struct tree_object { | |
| 8 char name[MAX_FN_COMPONENT+1]; | |
| 9 int is_dir; | |
| 10 union { | |
| 11 struct { | |
| 12 struct tree_object *children[MAX_DIR_ENTRIES]; | |
| 13 unsigned nchildren; | |
| 14 uint16_t *ffs_link_ptr; | |
| 15 } d; | |
| 16 struct { | |
| 17 char host_pathname[MAXPATHLEN]; | |
| 18 } f; | |
| 19 } u; | |
| 20 }; | |
| 21 | |
| 22 /* actual TIFFS on-media structure */ | |
| 23 struct tiffs_inode { | |
| 24 uint16_t size; | |
| 25 uint8_t reserved1; | |
| 26 uint8_t type; | |
| 27 uint16_t child; | |
| 28 uint16_t sibling; | |
| 29 uint32_t location; | |
| 30 uint16_t sequence; | |
| 31 uint16_t updates; | |
| 32 }; | |
| 33 | |
| 34 /* TIFFS object types */ | |
| 35 #define OBJTYPE_FILE 0xF1 | |
| 36 #define OBJTYPE_DIR 0xF2 | |
| 37 #define OBJTYPE_SYMLINK 0xF3 | |
| 38 #define OBJTYPE_SEGMENT 0xF4 |
