|
TARFS 0.1.5
Read-only TAR filesystem for ESP32
|
TARFS inode structure, 12..20 bytes per inode; 1000 files require ~16KiB of RAM to store the filesystem index. More...
#include <inode.h>
Data Fields | |
| uint32_t | in_hash |
| uintptr_t | in_path |
| uintptr_t | in_vaddr |
| uintptr_t | in_dvaddr |
| struct tarfs_inode * | in_next |
TARFS inode structure, 12..20 bytes per inode; 1000 files require ~16KiB of RAM to store the filesystem index.
Inode represents a resolved filesystem object as a mapping: (hashed pathname) -> (tar header location in archive memory).
Each inode corresponds to one usable tar entry.
Usable entries are tar record types:
Notes:
A structure like this: name1 -links--> name2 –link--> name4.txt will result in 3 inodes:
inode1.in_vaddr ==> "name1" entry inode1.in_dvaddr ==> "name4.txt" entry
inode2.in_vaddr ==> "name2" entry inode2.in_dvaddr ==> "name4.txt" entry
inode3.in_vaddr ==> "name4.txt" entry inode3.in_dvaddr ==> "name4.txt" entry
TARFS maintains two independent indexes:
| uintptr_t tarfs_inode_t::in_dvaddr |
| uint32_t tarfs_inode_t::in_hash |
| struct tarfs_inode* tarfs_inode_t::in_next |
| uintptr_t tarfs_inode_t::in_path |
Pointer to the full pathname. The pathname is not guaranteed to be NUL-terminated. It may end at '\0', '\r' or '
', therefore tar_strcmp() must be used.
| uintptr_t tarfs_inode_t::in_vaddr |