summaryrefslogtreecommitdiff
path: root/lib/sqfs/block_writer.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-29 18:20:58 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-29 18:24:25 +0200
commit50b901d5ebdad40227de66cd5a0a0f62548f1563 (patch)
tree167e0da994a64a59164099b5d01b1e8aea8a5f66 /lib/sqfs/block_writer.c
parentcada7ca7d9386e68c38fc504c01bd2cac33dac44 (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/block_writer.c')
-rw-r--r--lib/sqfs/block_writer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqfs/block_writer.c b/lib/sqfs/block_writer.c
index a6ca4b3..07780d7 100644
--- a/lib/sqfs/block_writer.c
+++ b/lib/sqfs/block_writer.c
@@ -115,8 +115,8 @@ static void block_writer_destroy(sqfs_object_t *wr)
free(wr);
}
-static int write_data_block(sqfs_block_writer_t *base, sqfs_u32 size,
- sqfs_u32 checksum, sqfs_u32 flags,
+static int write_data_block(sqfs_block_writer_t *base, void *user,
+ sqfs_u32 size, sqfs_u32 checksum, sqfs_u32 flags,
const sqfs_u8 *data, sqfs_u64 *location)
{
block_writer_default_t *wr = (block_writer_default_t *)base;
@@ -124,6 +124,7 @@ static int write_data_block(sqfs_block_writer_t *base, sqfs_u32 size,
sqfs_u64 offset;
sqfs_u32 out;
int err;
+ (void)user;
if (flags & SQFS_BLK_FIRST_BLOCK) {
wr->start = wr->file->get_size(wr->file);