summaryrefslogtreecommitdiff
path: root/include/sqfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-02-11 23:43:24 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-02-12 00:19:05 +0100
commitdd574620f888a50b84b5acb029e9a9dac212da64 (patch)
tree44bae66e73bf15f07701d0933b9a9be3473b6709 /include/sqfs
parent3c18216e23eb74af23672d0687692d785647223d (diff)
Remove usage of sqfs_block_t from block reader
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs')
-rw-r--r--include/sqfs/data_reader.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/sqfs/data_reader.h b/include/sqfs/data_reader.h
index bf29417..0c4918c 100644
--- a/include/sqfs/data_reader.h
+++ b/include/sqfs/data_reader.h
@@ -97,13 +97,15 @@ SQFS_API int sqfs_data_reader_load_fragment_table(sqfs_data_reader_t *data,
*
* @param data A pointer to a data reader object.
* @param inode A pointer to the inode describing the file.
- * @param out Returns a pointer to the tail block of the file.
+ * @param size Returns the size of the data read.
+ * @param out Returns a pointer to the raw data that must be
+ * released using free.
*
* @return Zero on succcess, an @ref E_SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_data_reader_get_fragment(sqfs_data_reader_t *data,
const sqfs_inode_generic_t *inode,
- sqfs_block_t **out);
+ size_t *size, sqfs_u8 **out);
/**
* @brief Get a full sized data block of a file by block index.
@@ -113,13 +115,16 @@ SQFS_API int sqfs_data_reader_get_fragment(sqfs_data_reader_t *data,
* @param data A pointer to a data reader object.
* @param inode A pointer to the inode describing the file.
* @param index The block index in the inodes block list.
- * @param out Returns a pointer to the data block.
+ * @param size Returns the size of the data read.
+ * @param out Returns a pointer to the raw data that must be
+ * released using free.
*
* @return Zero on succcess, an @ref E_SQFS_ERROR value on failure.
*/
SQFS_API int sqfs_data_reader_get_block(sqfs_data_reader_t *data,
const sqfs_inode_generic_t *inode,
- size_t index, sqfs_block_t **out);
+ size_t index, size_t *size,
+ sqfs_u8 **out);
/**
* @brief A simple UNIX-read-like function to read data from a file.