From 1a6b70f3702d3bdb0f1cb8e4669ec5ed21ea923b Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 20 Sep 2019 22:17:20 +0200 Subject: Split data reader constructor and fragment table loading Signed-off-by: David Oberhollenzer --- unpack/rdsquashfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'unpack') diff --git a/unpack/rdsquashfs.c b/unpack/rdsquashfs.c index e8ec3ec..29f9b79 100644 --- a/unpack/rdsquashfs.c +++ b/unpack/rdsquashfs.c @@ -80,10 +80,13 @@ int main(int argc, char **argv) goto out_id; } - data = data_reader_create(file, &super, cmp); + data = data_reader_create(file, super.block_size, cmp); if (data == NULL) goto out_dr; + if (data_reader_load_fragment_table(data, &super)) + goto out_data; + ret = sqfs_dir_reader_get_full_hierarchy(dirrd, idtbl, opt.cmdpath, opt.rdtree_flags, &n); if (ret) { -- cgit v1.2.3