summaryrefslogtreecommitdiff
path: root/lib/sqfshelper/serialize_fstree.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-08 14:53:30 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-08 14:53:30 +0200
commit3a851dfe87c88ac1d4dddc2a26cc48b037f852f9 (patch)
treea8a8f34291aa58b25737088d247a91a7f60b4fec /lib/sqfshelper/serialize_fstree.c
parent60064dd0412a149fe00cfc4e2f2361c22656db57 (diff)
Replace direct file I/O with abstraction layer
This should make it easier to use libsquashfs with custom setups that embedd a squashfs image inside something else. Also, it should make it easier to port to non unix-like platforms. 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqfshelper/serialize_fstree.c b/lib/sqfshelper/serialize_fstree.c
index dfadedd..ea3d479 100644
--- a/lib/sqfshelper/serialize_fstree.c
+++ b/lib/sqfshelper/serialize_fstree.c
@@ -41,7 +41,7 @@ static int write_dir_entries(sqfs_dir_writer_t *dirw, tree_node_t *node)
return 0;
}
-int sqfs_serialize_fstree(int outfd, sqfs_super_t *super, fstree_t *fs,
+int sqfs_serialize_fstree(sqfs_file_t *file, sqfs_super_t *super, fstree_t *fs,
sqfs_compressor_t *cmp, sqfs_id_table_t *idtbl)
{
sqfs_inode_generic_t *inode;
@@ -52,11 +52,11 @@ int sqfs_serialize_fstree(int outfd, sqfs_super_t *super, fstree_t *fs,
int ret = -1;
size_t i;
- im = sqfs_meta_writer_create(outfd, cmp, false);
+ im = sqfs_meta_writer_create(file, cmp, false);
if (im == NULL)
return -1;
- dm = sqfs_meta_writer_create(outfd, cmp, true);
+ dm = sqfs_meta_writer_create(file, cmp, true);
if (dm == NULL)
goto out_im;