diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-07-02 12:27:33 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-07-02 12:27:33 +0200 |
commit | 0bf27f94c3f745c85adda0dc25689dc6e328822c (patch) | |
tree | 58db6be5a4bef14d02b772fbcbd3b108da6bc982 /lib/sqfs | |
parent | 8aea2d1dc437b5b497170ef9c1b6854aee8f5dcf (diff) |
Fix directory index offset calculation
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs')
-rw-r--r-- | lib/sqfs/write_inode.c | 6 |
1 files changed, 1 insertions, 5 deletions
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); |