From ab0c4a02ba9d1a836f62a8601699c971b72eec07 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 16 Sep 2019 15:50:46 +0200 Subject: Add directory reader data structure This moves a lot of the stuff that is done manually in the tree deserializer to a generic helper in libsquashfs. Due to how the fstree is implemented, as a work around, the inode needs to be temporarily stored in the tree node, but some of the directory details could be removed. Signed-off-by: David Oberhollenzer --- include/fstree.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'include/fstree.h') diff --git a/include/fstree.h b/include/fstree.h index 4c02ce5..880a870 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -16,6 +16,8 @@ #include #include +#include "sqfs/inode.h" + #include "str_table.h" #define FSTREE_XATTR_KEY_BUCKETS 31 @@ -105,12 +107,6 @@ struct dir_info_t { directory meta data to disk. */ uint64_t size; - /* Start block offset, relative to directory table start. */ - uint64_t start_block; - - /* Byte offset into the uncompressed meta data block. */ - uint32_t block_offset; - /* Set to true for implicitly generated directories. */ bool created_implicitly; }; @@ -126,6 +122,8 @@ struct tree_node_t { /* For the root node, this points to an empty string. */ char *name; + sqfs_inode_generic_t *inode; + /* A pointer to an extended attribute array or NULL if unused. -- cgit v1.2.3