libsquashfs 1.3.0
A new set of tools and libraries for working with SquashFS images
|
Encapsulates state for simple directory reading. More...
#include <meta_reader.h>
Public Member Functions | |
SQFS_API int | sqfs_readdir_state_init (sqfs_readdir_state_t *s, const sqfs_super_t *super, const sqfs_inode_generic_t *inode) |
Initialize a state object for reading a directory. | |
Static Public Member Functions | |
static SQFS_INLINE void | sqfs_readdir_state_reset (sqfs_readdir_state_t *s) |
Rewind a directory state object back to its starting location. | |
Data Fields | |
struct { | |
sqfs_u64 block | |
size_t offset | |
size_t size | |
} | init |
struct { | |
sqfs_u64 block | |
size_t offset | |
size_t size | |
} | current |
size_t | entries |
sqfs_u32 | inum_base |
sqfs_u64 | inode_block |
Encapsulates state for simple directory reading.
Definition at line 56 of file meta_reader.h.
SQFS_API int sqfs_readdir_state_init | ( | sqfs_readdir_state_t * | s, |
const sqfs_super_t * | super, | ||
const sqfs_inode_generic_t * | inode | ||
) |
Initialize a state object for reading a directory.
This function initializes a simple state object to point to the location of a directory header and store the total, uncompressed size of the directory.
The state object can be passed to sqfs_meta_reader_readdir to read entries one-by-one.
s | A pointer to the state object to initialize. |
super | A pointer to the super block, telling us where the directory table starts. |
inode | A pointer to a directory inode from which to get the directory location. |
|
static |
Rewind a directory state object back to its starting location.
it | A pointer to the directory state. |
Definition at line 76 of file meta_reader.h.
sqfs_u64 block |
Definition at line 58 of file meta_reader.h.
size_t entries |
Definition at line 63 of file meta_reader.h.
sqfs_u64 inode_block |
Definition at line 66 of file meta_reader.h.
sqfs_u32 inum_base |
Definition at line 65 of file meta_reader.h.
size_t offset |
Definition at line 59 of file meta_reader.h.
size_t size |
Definition at line 60 of file meta_reader.h.