diff options
Diffstat (limited to 'bin/sqfsdiff')
-rw-r--r-- | bin/sqfsdiff/sqfsdiff.c | 11 | ||||
-rw-r--r-- | bin/sqfsdiff/sqfsdiff.h | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/bin/sqfsdiff/sqfsdiff.c b/bin/sqfsdiff/sqfsdiff.c index 2871322..b543c00 100644 --- a/bin/sqfsdiff/sqfsdiff.c +++ b/bin/sqfsdiff/sqfsdiff.c @@ -40,10 +40,17 @@ static int open_sfqs(sqfs_state_t *state, const char *path) if (state->super.flags & SQFS_FLAG_COMPRESSOR_OPTIONS) { ret = state->cmp->read_options(state->cmp, state->file); - if (ret) { + + if (ret == 0) { + state->cmp->get_configuration(state->cmp, + &state->options); + state->have_options = true; + } else { sqfs_perror(path, "reading compressor options", ret); - goto fail_cmp; + state->have_options = false; } + } else { + state->have_options = false; } state->idtbl = sqfs_id_table_create(0); diff --git a/bin/sqfsdiff/sqfsdiff.h b/bin/sqfsdiff/sqfsdiff.h index 94fce93..a8f1b32 100644 --- a/bin/sqfsdiff/sqfsdiff.h +++ b/bin/sqfsdiff/sqfsdiff.h @@ -27,6 +27,9 @@ typedef struct { sqfs_dir_reader_t *dr; sqfs_tree_node_t *root; sqfs_data_reader_t *data; + + sqfs_compressor_config_t options; + bool have_options; } sqfs_state_t; typedef struct { |