From 6a218f0927c0cced058e14ee5156f10860a149d3 Mon Sep 17 00:00:00 2001
From: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
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 <david.oberhollenzer@sigma-star.at>
---
 lib/sqfshelper/serialize_fstree.c | 7 -------
 1 file changed, 7 deletions(-)

(limited to 'lib/sqfshelper')

diff --git a/lib/sqfshelper/serialize_fstree.c b/lib/sqfshelper/serialize_fstree.c
index 88305e7..854231c 100644
--- a/lib/sqfshelper/serialize_fstree.c
+++ b/lib/sqfshelper/serialize_fstree.c
@@ -106,13 +106,6 @@ int sqfs_serialize_fstree(sqfs_file_t *file, sqfs_super_t *super, fstree_t *fs,
 			goto out;
 		}
 
-		if (inode->base.type == SQFS_INODE_EXT_DIR) {
-			if (sqfs_dir_writer_write_index(dirwr, im)) {
-				free(inode);
-				goto out;
-			}
-		}
-
 		free(inode);
 	}
 
-- 
cgit v1.2.3