diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-20 22:17:20 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-09-20 22:17:20 +0200 |
commit | 1a6b70f3702d3bdb0f1cb8e4669ec5ed21ea923b (patch) | |
tree | e35835e7497b12e96dbddd072b2fdd189f448990 /difftool/sqfsdiff.c | |
parent | e43be03653011f507901986cd9ff559cf20eb9cc (diff) |
Split data reader constructor and fragment table loading
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'difftool/sqfsdiff.c')
-rw-r--r-- | difftool/sqfsdiff.c | 7 |
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: |