aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/dir_reader/internal.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-06-01 00:10:22 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-06-02 17:26:53 +0200
commita36cf2824c74a3ba7333801268d0ba4194684423 (patch)
treef1fd950ea37bf6c91af7a154f90f5e6eb8b70e01 /lib/sqfs/dir_reader/internal.h
parentfa7110a9c4bd0ece4be33998b6f9e7d4f528acc7 (diff)
Cleanup: libsqfs: move directory iteration out of the directory reader
Add a simple directory state object to the meta data reader and use that to iterate directory entries. The code for reading the directory listing is movde to readdir.c Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/dir_reader/internal.h')
-rw-r--r--lib/sqfs/dir_reader/internal.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/sqfs/dir_reader/internal.h b/lib/sqfs/dir_reader/internal.h
index cd20b69..4dbe728 100644
--- a/lib/sqfs/dir_reader/internal.h
+++ b/lib/sqfs/dir_reader/internal.h
@@ -38,14 +38,7 @@ struct sqfs_dir_reader_t {
sqfs_meta_reader_t *meta_inode;
const sqfs_super_t *super;
- sqfs_dir_header_t hdr;
- sqfs_u64 dir_block_start;
- size_t entries;
- size_t size;
-
- size_t start_size;
- sqfs_u16 dir_offset;
- sqfs_u16 inode_offset;
+ sqfs_readdir_state_t it;
sqfs_u32 flags;
@@ -53,6 +46,7 @@ struct sqfs_dir_reader_t {
int state;
sqfs_u64 parent_ref;
sqfs_u64 cur_ref;
+ sqfs_u64 ent_ref;
rbtree_t dcache;
};