From 74a755290c6b000b1a793f09ce5b6ee6d4016eaf Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 29 Sep 2019 00:30:35 +0200 Subject: Make the data writer padding hookable Signed-off-by: David Oberhollenzer --- include/sqfs/data_writer.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/sqfs/data_writer.h b/include/sqfs/data_writer.h index a895b7a..210a08d 100644 --- a/include/sqfs/data_writer.h +++ b/include/sqfs/data_writer.h @@ -125,6 +125,15 @@ struct sqfs_block_hooks_t { * fragment block. */ void (*notify_fragment_discard)(void *user, const sqfs_block_t *block); + + /** + * @brief Gets called before writing a block of padding bytes to disk. + * + * @param user A user pointer. + * @param block The padding bytes that are about to be written. + * @param count The number of padding bytes in the block. + */ + void (*prepare_padding)(void *user, sqfs_u8 *block, size_t count); }; #ifdef __cplusplus -- cgit v1.2.3