aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/meta_writer.h2
-rw-r--r--lib/sqfs/write_dir.c2
-rw-r--r--lib/sqfs/write_inode.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/include/meta_writer.h b/include/meta_writer.h
index c10dd16..09d7456 100644
--- a/include/meta_writer.h
+++ b/include/meta_writer.h
@@ -10,7 +10,7 @@
typedef struct {
tree_node_t *node;
uint32_t block;
- uint32_t offset;
+ uint32_t index;
} idx_ref_t;
typedef struct {
diff --git a/lib/sqfs/write_dir.c b/lib/sqfs/write_dir.c
index 9f8923b..909e0bb 100644
--- a/lib/sqfs/write_dir.c
+++ b/lib/sqfs/write_dir.c
@@ -99,7 +99,7 @@ int meta_writer_write_dir(meta_writer_t *dm, dir_info_t *dir,
i = (*index)->num_nodes++;
(*index)->idx_nodes[i].node = c;
(*index)->idx_nodes[i].block = block;
- (*index)->idx_nodes[i].offset = offset;
+ (*index)->idx_nodes[i].index = dir->size;
hdr.count = htole32(count - 1);
hdr.start_block = htole32(c->inode_ref >> 16);
diff --git a/lib/sqfs/write_inode.c b/lib/sqfs/write_inode.c
index 611b0e1..a013d6f 100644
--- a/lib/sqfs/write_inode.c
+++ b/lib/sqfs/write_inode.c
@@ -101,7 +101,7 @@ static int write_dir_index(dir_index_t *diridx, meta_writer_t *im)
for (i = 0; i < diridx->num_nodes; ++i) {
idx.start_block = htole32(diridx->idx_nodes[i].block);
- idx.index = htole32(diridx->idx_nodes[i].offset);
+ idx.index = htole32(diridx->idx_nodes[i].index);
idx.size = strlen(diridx->idx_nodes[i].node->name) - 1;
idx.size = htole32(idx.size);