diff options
Diffstat (limited to 'include/data_reader.h')
-rw-r--r-- | include/data_reader.h | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/include/data_reader.h b/include/data_reader.h index a8ccabf..2ad3749 100644 --- a/include/data_reader.h +++ b/include/data_reader.h @@ -13,27 +13,29 @@ #include "sqfs/data.h" #include "fstree.h" -typedef struct data_reader_t data_reader_t; +typedef struct sqfs_data_reader_t sqfs_data_reader_t; -data_reader_t *data_reader_create(sqfs_file_t *file, size_t block_size, - sqfs_compressor_t *cmp); +sqfs_data_reader_t *sqfs_data_reader_create(sqfs_file_t *file, + size_t block_size, + sqfs_compressor_t *cmp); -int data_reader_load_fragment_table(data_reader_t *data, - const sqfs_super_t *super); +int sqfs_data_reader_load_fragment_table(sqfs_data_reader_t *data, + const sqfs_super_t *super); -void data_reader_destroy(data_reader_t *data); +void sqfs_data_reader_destroy(sqfs_data_reader_t *data); -int data_reader_get_fragment(data_reader_t *data, - const sqfs_inode_generic_t *inode, - sqfs_block_t **out); +int sqfs_data_reader_get_fragment(sqfs_data_reader_t *data, + const sqfs_inode_generic_t *inode, + sqfs_block_t **out); -int data_reader_get_block(data_reader_t *data, - const sqfs_inode_generic_t *inode, - size_t index, sqfs_block_t **out); +int sqfs_data_reader_get_block(sqfs_data_reader_t *data, + const sqfs_inode_generic_t *inode, + size_t index, sqfs_block_t **out); -int data_reader_dump(data_reader_t *data, const sqfs_inode_generic_t *inode, - int outfd, size_t block_size, bool allow_sparse); +int sqfs_data_reader_dump(sqfs_data_reader_t *data, + const sqfs_inode_generic_t *inode, + int outfd, size_t block_size, bool allow_sparse); /* Read a chunk of data from a file. Starting from 'offset' into the @@ -42,8 +44,8 @@ int data_reader_dump(data_reader_t *data, const sqfs_inode_generic_t *inode, Returns the number of bytes read, 0 if EOF, -1 on failure. Prints an error message to stderr on failure. */ -ssize_t data_reader_read(data_reader_t *data, - const sqfs_inode_generic_t *inode, - uint64_t offset, void *buffer, size_t size); +ssize_t sqfs_data_reader_read(sqfs_data_reader_t *data, + const sqfs_inode_generic_t *inode, + uint64_t offset, void *buffer, size_t size); #endif /* DATA_READER_H */ |