summaryrefslogtreecommitdiff
path: root/lib/sqfshelper/write_export_table.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/write_export_table.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/write_export_table.c')
-rw-r--r--lib/sqfshelper/write_export_table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqfshelper/write_export_table.c b/lib/sqfshelper/write_export_table.c
index b0ad4ce..f4c6658 100644
--- a/lib/sqfshelper/write_export_table.c
+++ b/lib/sqfshelper/write_export_table.c
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <stdio.h>
-int write_export_table(int outfd, fstree_t *fs, sqfs_super_t *super,
+int write_export_table(sqfs_file_t *file, fstree_t *fs, sqfs_super_t *super,
sqfs_compressor_t *cmp)
{
uint64_t *table, start;
@@ -38,7 +38,7 @@ int write_export_table(int outfd, fstree_t *fs, sqfs_super_t *super,
}
size = sizeof(uint64_t) * (fs->inode_tbl_size - 1);
- ret = sqfs_write_table(outfd, super, cmp, table, size, &start);
+ ret = sqfs_write_table(file, super, cmp, table, size, &start);
super->export_table_start = start;
super->flags |= SQFS_FLAG_EXPORTABLE;