From 50b901d5ebdad40227de66cd5a0a0f62548f1563 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Fri, 29 May 2020 18:20:58 +0200 Subject: Support associating a user pointer with data blocks This commit modifies the block processor to support associating a user data pointer with data blocks that it forwards to the block writer, which is modified to accept an optional user data pointer. Signed-off-by: David Oberhollenzer --- include/sqfs/block_processor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/sqfs/block_processor.h') diff --git a/include/sqfs/block_processor.h b/include/sqfs/block_processor.h index c88e3df..5c77155 100644 --- a/include/sqfs/block_processor.h +++ b/include/sqfs/block_processor.h @@ -168,6 +168,8 @@ sqfs_block_processor_t *sqfs_block_processor_create(size_t max_block_size, * @param inode An optional pointer to a pointer to an inode. If not NULL, the * block processor creates a file inode and stores a pointer to * it here and keeps updating the inode as the file grows. + * @param user An optional user data pointer that is passed to the + * the @ref sqfs_block_writer_t for each file data block. * @param flags A combination of @ref SQFS_BLK_FLAGS that can be used to * micro manage how the data is processed. * @@ -175,7 +177,7 @@ sqfs_block_processor_t *sqfs_block_processor_create(size_t max_block_size, */ SQFS_API int sqfs_block_processor_begin_file(sqfs_block_processor_t *proc, sqfs_inode_generic_t **inode, - sqfs_u32 flags); + void *user, sqfs_u32 flags); /** * @brief Append data to the current file. -- cgit v1.2.3