aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/block_processor/frontend.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs/block_processor/frontend.c')
-rw-r--r--lib/sqfs/block_processor/frontend.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/sqfs/block_processor/frontend.c b/lib/sqfs/block_processor/frontend.c
index a4a38e9..e8a4207 100644
--- a/lib/sqfs/block_processor/frontend.c
+++ b/lib/sqfs/block_processor/frontend.c
@@ -52,6 +52,21 @@ int enqueue_block(sqfs_block_processor_t *proc, sqfs_block_t *blk)
{
int status;
+ if ((blk->flags & SQFS_BLK_FRAGMENT_BLOCK) &&
+ proc->file != NULL && proc->uncmp != NULL) {
+ sqfs_block_t *copy = alloc_flex(sizeof(*copy), 1, blk->size);
+
+ if (copy == NULL)
+ return SQFS_ERROR_ALLOC;
+
+ copy->size = blk->size;
+ copy->index = blk->index;
+ memcpy(copy->data, blk->data, blk->size);
+
+ copy->next = proc->fblk_in_flight;
+ proc->fblk_in_flight = copy;
+ }
+
if (proc->pool->submit(proc->pool, blk) != 0) {
status = proc->pool->get_status(proc->pool);