summaryrefslogtreecommitdiff
path: root/difftool
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-20 22:17:20 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-20 22:17:20 +0200
commit1a6b70f3702d3bdb0f1cb8e4669ec5ed21ea923b (patch)
treee35835e7497b12e96dbddd072b2fdd189f448990 /difftool
parente43be03653011f507901986cd9ff559cf20eb9cc (diff)
Split data reader constructor and fragment table loading
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'difftool')
-rw-r--r--difftool/sqfsdiff.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/difftool/sqfsdiff.c b/difftool/sqfsdiff.c
index 6d1a9af..22b8ec6 100644
--- a/difftool/sqfsdiff.c
+++ b/difftool/sqfsdiff.c
@@ -69,14 +69,19 @@ static int open_sfqs(sqfs_state_t *state, const char *path)
goto fail_dr;
}
- state->data = data_reader_create(state->file, &state->super,
+ state->data = data_reader_create(state->file, state->super.block_size,
state->cmp);
if (state->data == NULL) {
fprintf(stderr, "%s: error loading file system tree\n", path);
goto fail_tree;
}
+ if (data_reader_load_fragment_table(state->data, &state->super))
+ goto fail_data;
+
return 0;
+fail_data:
+ data_reader_destroy(state->data);
fail_tree:
sqfs_dir_tree_destroy(state->root);
fail_dr: