diff options
Diffstat (limited to 'lib/sqfs/block_processor/serial.c')
-rw-r--r-- | lib/sqfs/block_processor/serial.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/sqfs/block_processor/serial.c b/lib/sqfs/block_processor/serial.c index dce7490..b1e1823 100644 --- a/lib/sqfs/block_processor/serial.c +++ b/lib/sqfs/block_processor/serial.c @@ -77,3 +77,22 @@ int wait_completed(sqfs_block_processor_t *proc) { return proc->status; } + +int sqfs_block_processor_finish(sqfs_block_processor_t *proc) +{ + if (proc->frag_block != NULL && proc->status == 0) { + proc->status = block_processor_do_block(proc->frag_block, + proc->cmp, + proc->scratch, + proc->max_block_size); + + if (proc->status == 0) { + proc->status = process_completed_block(proc, + proc->frag_block); + } + } + + free(proc->frag_block); + proc->frag_block = NULL; + return proc->status; +} |