summaryrefslogtreecommitdiff
path: root/lib/sqfshelper/serialize_fstree.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-04 18:28:59 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-04 18:28:59 +0200
commit3b7f4dbb284462ef7065e19f1725f615973477da (patch)
tree2f1da14b33e69f4a73e49abf2fdec2dbd1844f23 /lib/sqfshelper/serialize_fstree.c
parent407a2baae5622b05f1e9c4137448a973fd648736 (diff)
Store number of file blocks in generic inode struct
This simplifies things a little bit. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfshelper/serialize_fstree.c')
-rw-r--r--lib/sqfshelper/serialize_fstree.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/sqfshelper/serialize_fstree.c b/lib/sqfshelper/serialize_fstree.c
index f8f3913..8e87354 100644
--- a/lib/sqfshelper/serialize_fstree.c
+++ b/lib/sqfshelper/serialize_fstree.c
@@ -47,10 +47,10 @@ int sqfs_serialize_fstree(int outfd, sqfs_super_t *super, fstree_t *fs,
sqfs_inode_generic_t *inode;
sqfs_dir_writer_t *dirwr;
meta_writer_t *im, *dm;
- size_t i, count;
uint32_t offset;
uint64_t block;
int ret = -1;
+ size_t i;
im = meta_writer_create(outfd, cmp, false);
if (im == NULL)
@@ -70,8 +70,7 @@ int sqfs_serialize_fstree(int outfd, sqfs_super_t *super, fstree_t *fs,
goto out;
}
- inode = tree_node_to_inode(fs, idtbl, fs->inode_table[i],
- &count);
+ inode = tree_node_to_inode(fs, idtbl, fs->inode_table[i]);
if (inode == NULL)
goto out;
@@ -83,7 +82,7 @@ int sqfs_serialize_fstree(int outfd, sqfs_super_t *super, fstree_t *fs,
meta_writer_get_position(im, &block, &offset);
fs->inode_table[i]->inode_ref = (block << 16) | offset;
- if (meta_writer_write_inode(im, inode, count)) {
+ if (meta_writer_write_inode(im, inode)) {
free(inode);
goto out;
}