summaryrefslogtreecommitdiff
path: root/lib/sqfs/read_table.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 17:17:38 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-05 17:17:53 +0200
commita4b4c27bb01e64ff0072be78f7ddc0fa64193bfa (patch)
tree463fc886baae6b12f01c22c8a53ac94491d8a2ad /lib/sqfs/read_table.c
parentdd5d7adaa914982e8947bfe76fa3f195ed11cdb1 (diff)
Cleanup: add sqfs_* prefix to meta reader
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/read_table.c')
-rw-r--r--lib/sqfs/read_table.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sqfs/read_table.c b/lib/sqfs/read_table.c
index e7ba08a..1470fac 100644
--- a/lib/sqfs/read_table.c
+++ b/lib/sqfs/read_table.c
@@ -20,7 +20,7 @@ void *sqfs_read_table(int fd, compressor_t *cmp, size_t table_size,
{
size_t diff, block_count, blk_idx = 0;
uint64_t start, *locations;
- meta_reader_t *m;
+ sqfs_meta_reader_t *m;
void *data, *ptr;
data = malloc(table_size);
@@ -48,7 +48,7 @@ void *sqfs_read_table(int fd, compressor_t *cmp, size_t table_size,
}
/* Read the actual data */
- m = meta_reader_create(fd, cmp, lower_limit, upper_limit);
+ m = sqfs_meta_reader_create(fd, cmp, lower_limit, upper_limit);
if (m == NULL)
goto fail_idx;
@@ -57,25 +57,25 @@ void *sqfs_read_table(int fd, compressor_t *cmp, size_t table_size,
while (table_size > 0) {
start = le64toh(locations[blk_idx++]);
- if (meta_reader_seek(m, start, 0))
+ if (sqfs_meta_reader_seek(m, start, 0))
goto fail;
diff = SQFS_META_BLOCK_SIZE;
if (diff > table_size)
diff = table_size;
- if (meta_reader_read(m, ptr, diff))
+ if (sqfs_meta_reader_read(m, ptr, diff))
goto fail;
ptr = (char *)ptr + diff;
table_size -= diff;
}
- meta_reader_destroy(m);
+ sqfs_meta_reader_destroy(m);
free(locations);
return data;
fail:
- meta_reader_destroy(m);
+ sqfs_meta_reader_destroy(m);
fail_idx:
free(locations);
fail_data: