summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-29 00:30:35 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-29 00:30:35 +0200
commit74a755290c6b000b1a793f09ce5b6ee6d4016eaf (patch)
tree1895750cb9c3abe6a1e50d6fea558b5f58425675 /lib
parente6c323d4d3405130e6bc2392dc28bcfd41feb83a (diff)
Make the data writer padding hookable
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib')
-rw-r--r--lib/sqfs/data_writer/block.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqfs/data_writer/block.c b/lib/sqfs/data_writer/block.c
index 7c52bb4..01e1387 100644
--- a/lib/sqfs/data_writer/block.c
+++ b/lib/sqfs/data_writer/block.c
@@ -70,6 +70,9 @@ static int allign_file(sqfs_data_writer_t *proc, sqfs_block_t *blk)
if (padding == 0)
return SQFS_ERROR_ALLOC;
+ if (proc->hooks != NULL && proc->hooks->prepare_padding != NULL)
+ proc->hooks->prepare_padding(proc->user_ptr, padding, diff);
+
chksum = crc32(0, padding, diff);
ret = proc->file->write_at(proc->file, size, padding, diff);