summaryrefslogtreecommitdiff
path: root/lib/sqfshelper/sqfs_reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfshelper/sqfs_reader.c')
-rw-r--r--lib/sqfshelper/sqfs_reader.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/sqfshelper/sqfs_reader.c b/lib/sqfshelper/sqfs_reader.c
index 197e08f..49e91f5 100644
--- a/lib/sqfshelper/sqfs_reader.c
+++ b/lib/sqfshelper/sqfs_reader.c
@@ -14,6 +14,8 @@
int sqfs_reader_open(sqfs_reader_t *rd, const char *filename, int rdtree_flags)
{
+ compressor_config_t cfg;
+
memset(rd, 0, sizeof(*rd));
rd->sqfsfd = open(filename, O_RDONLY);
@@ -30,8 +32,11 @@ int sqfs_reader_open(sqfs_reader_t *rd, const char *filename, int rdtree_flags)
goto fail_fd;
}
- rd->cmp = compressor_create(rd->super.compression_id, false,
- rd->super.block_size, NULL);
+ compressor_config_init(&cfg, rd->super.compression_id,
+ rd->super.block_size,
+ SQFS_COMP_FLAG_UNCOMPRESS);
+
+ rd->cmp = compressor_create(&cfg);
if (rd->cmp == NULL)
goto fail_fd;