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 --- lib/sqfs/block_processor/internal.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/sqfs/block_processor/internal.h') diff --git a/lib/sqfs/block_processor/internal.h b/lib/sqfs/block_processor/internal.h index 61e13d7..d28e023 100644 --- a/lib/sqfs/block_processor/internal.h +++ b/lib/sqfs/block_processor/internal.h @@ -42,6 +42,9 @@ typedef struct sqfs_block_t { consolidate in reverse order. */ struct sqfs_block_t *frag_list; + /* User data pointer */ + void *user; + sqfs_u8 data[]; } sqfs_block_t; @@ -59,6 +62,7 @@ struct sqfs_block_processor_t { sqfs_block_t *blk_current; sqfs_u32 blk_flags; sqfs_u32 blk_index; + void *user; sqfs_block_t *free_list; -- cgit v1.2.3