summaryrefslogtreecommitdiff
path: root/lib/sqfs/blk_proc/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs/blk_proc/serial.c')
-rw-r--r--lib/sqfs/blk_proc/serial.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/sqfs/blk_proc/serial.c b/lib/sqfs/blk_proc/serial.c
index b6c17fb..b7bc545 100644
--- a/lib/sqfs/blk_proc/serial.c
+++ b/lib/sqfs/blk_proc/serial.c
@@ -51,8 +51,18 @@ int sqfs_block_processor_enqueue(sqfs_block_processor_t *proc,
return proc->status;
}
- proc->status = sqfs_block_process(block, proc->cmp,
- proc->scratch, proc->max_block_size);
+ if (block->flags & ~SQFS_BLK_USER_SETTABLE_FLAGS) {
+ proc->status = SQFS_ERROR_UNSUPPORTED;
+ return proc->status;
+ }
+
+ if (block->size == 0) {
+ block->checksum = 0;
+ } else {
+ proc->status = sqfs_block_process(block, proc->cmp,
+ proc->scratch,
+ proc->max_block_size);
+ }
block->next = NULL;
return process_completed_blocks(proc, block);