summaryrefslogtreecommitdiff
path: root/difftool
diff options
context:
space:
mode:
Diffstat (limited to 'difftool')
-rw-r--r--difftool/compare_files.c4
-rw-r--r--difftool/extract.c4
-rw-r--r--difftool/sqfsdiff.c11
-rw-r--r--difftool/sqfsdiff.h2
4 files changed, 11 insertions, 10 deletions
diff --git a/difftool/compare_files.c b/difftool/compare_files.c
index 591fc2c..a977d95 100644
--- a/difftool/compare_files.c
+++ b/difftool/compare_files.c
@@ -10,12 +10,12 @@ static unsigned char old_buf[MAX_WINDOW_SIZE];
static unsigned char new_buf[MAX_WINDOW_SIZE];
static int read_blob(const char *prefix, const char *path,
- data_reader_t *rd, const sqfs_inode_generic_t *inode,
+ sqfs_data_reader_t *rd, const sqfs_inode_generic_t *inode,
void *buffer, uint64_t offset, size_t size)
{
ssize_t ret;
- ret = data_reader_read(rd, inode, offset, buffer, size);
+ ret = sqfs_data_reader_read(rd, inode, offset, buffer, size);
ret = (ret < 0 || (size_t)ret < size) ? -1 : 0;
if (ret) {
diff --git a/difftool/extract.c b/difftool/extract.c
index 94477b1..c0cebfd 100644
--- a/difftool/extract.c
+++ b/difftool/extract.c
@@ -6,7 +6,7 @@
*/
#include "sqfsdiff.h"
-static int extract(data_reader_t *data, const sqfs_inode_generic_t *inode,
+static int extract(sqfs_data_reader_t *data, const sqfs_inode_generic_t *inode,
const char *prefix, const char *path, size_t block_size)
{
char *ptr, *temp;
@@ -27,7 +27,7 @@ static int extract(data_reader_t *data, const sqfs_inode_generic_t *inode,
return -1;
}
- if (data_reader_dump(data, inode, fd, block_size, true)) {
+ if (sqfs_data_reader_dump(data, inode, fd, block_size, true)) {
close(fd);
return -1;
}
diff --git a/difftool/sqfsdiff.c b/difftool/sqfsdiff.c
index 22b8ec6..b0d270a 100644
--- a/difftool/sqfsdiff.c
+++ b/difftool/sqfsdiff.c
@@ -69,19 +69,20 @@ static int open_sfqs(sqfs_state_t *state, const char *path)
goto fail_dr;
}
- state->data = data_reader_create(state->file, state->super.block_size,
- state->cmp);
+ state->data = sqfs_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))
+ if (sqfs_data_reader_load_fragment_table(state->data, &state->super))
goto fail_data;
return 0;
fail_data:
- data_reader_destroy(state->data);
+ sqfs_data_reader_destroy(state->data);
fail_tree:
sqfs_dir_tree_destroy(state->root);
fail_dr:
@@ -97,7 +98,7 @@ fail_file:
static void close_sfqs(sqfs_state_t *state)
{
- data_reader_destroy(state->data);
+ sqfs_data_reader_destroy(state->data);
sqfs_dir_tree_destroy(state->root);
sqfs_dir_reader_destroy(state->dr);
sqfs_id_table_destroy(state->idtbl);
diff --git a/difftool/sqfsdiff.h b/difftool/sqfsdiff.h
index 40c0fc5..e274353 100644
--- a/difftool/sqfsdiff.h
+++ b/difftool/sqfsdiff.h
@@ -30,7 +30,7 @@ typedef struct {
sqfs_id_table_t *idtbl;
sqfs_dir_reader_t *dr;
sqfs_tree_node_t *root;
- data_reader_t *data;
+ sqfs_data_reader_t *data;
} sqfs_state_t;
typedef struct {