From 6a218f0927c0cced058e14ee5156f10860a149d3 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 3 Oct 2019 12:11:51 +0200 Subject: Store directory index in generic inode structure This commit modifies the dir writer to store the directory index directly in the payload area of the inode it creates. The size of the index in bytes is stored in a seperate field. Storing the index is moved to the write inode function. The read inode function is in turn also modified to read the directory index from disk and actually store it in the inode structure in memory for later use. Signed-off-by: David Oberhollenzer --- include/sqfs/inode.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/sqfs/inode.h') diff --git a/include/sqfs/inode.h b/include/sqfs/inode.h index f04f036..8b69b7e 100644 --- a/include/sqfs/inode.h +++ b/include/sqfs/inode.h @@ -504,6 +504,12 @@ struct sqfs_inode_generic_t { */ size_t num_file_blocks; + /** + * @brief For extended directory inodes, stores the number of payload + * bytes following for the directory index. + */ + size_t num_dir_idx_bytes; + /** * @brief Type specific inode data. */ -- cgit v1.2.3