From 0bf27f94c3f745c85adda0dc25689dc6e328822c Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Tue, 2 Jul 2019 12:27:33 +0200 Subject: Fix directory index offset calculation Signed-off-by: David Oberhollenzer --- lib/sqfs/write_inode.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/sqfs') diff --git a/lib/sqfs/write_inode.c b/lib/sqfs/write_inode.c index 82663e7..33fe3d6 100644 --- a/lib/sqfs/write_inode.c +++ b/lib/sqfs/write_inode.c @@ -263,11 +263,7 @@ int meta_writer_write_inode(fstree_t *fs, id_table_t *idtbl, meta_writer_t *im, for (i = 0; i < diridx->num_nodes; ++i) { idx.start_block = htole32(diridx->idx_nodes[i].block); - - idx.index = diridx->idx_nodes[i].offset; - idx.index -= node->data.dir->block_offset; - idx.index = htole32(idx.index); - + idx.index = htole32(diridx->idx_nodes[i].offset); idx.size = strlen(diridx->idx_nodes[i].node->name) - 1; idx.size = htole32(idx.size); -- cgit v1.2.3