diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-21 14:04:43 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-08-21 14:04:43 +0200 |
commit | 4ff2b4f689f4e530b6c6f3eed17a595f7ccf56fb (patch) | |
tree | 1e453c616d34a1547eb8e62949337e8361c6b31e /difftool/extract.c | |
parent | 5cbc1267e5dc42149eeb07883f5f6239d22388e9 (diff) |
Isolate sqfsdiff global state and split off option processing
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'difftool/extract.c')
-rw-r--r-- | difftool/extract.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/difftool/extract.c b/difftool/extract.c index f40de60..cefba62 100644 --- a/difftool/extract.c +++ b/difftool/extract.c @@ -37,15 +37,16 @@ static int extract(data_reader_t *data, file_info_t *fi, return 0; } -int extract_files(file_info_t *old, file_info_t *new, const char *path) +int extract_files(sqfsdiff_t *sd, file_info_t *old, file_info_t *new, + const char *path) { - if (old != NULL && !old_is_dir) { - if (extract(sqfs_old.data, old, path, 'a')) + if (old != NULL && !sd->old_is_dir) { + if (extract(sd->sqfs_old.data, old, path, 'a')) return -1; } - if (new != NULL && !new_is_dir) { - if (extract(sqfs_new.data, new, path, 'b')) + if (new != NULL && !sd->new_is_dir) { + if (extract(sd->sqfs_new.data, new, path, 'b')) return -1; } return 0; |