aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/process_block.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-10 15:56:35 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-10 15:56:35 +0200
commitcd662fccc563e18762e2e6a16d040e0474b6e5f9 (patch)
treedf44dc902e57960d0f193b9adc2fb71a0086a17e /lib/sqfs/process_block.c
parent1fe6b2aa4158516f9c6cf5751cc68aafef1af620 (diff)
Minor cleanup of the block processor
- Set the "compression failed" flag in the common implementation. - Use static initializers for the pthread code. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/process_block.c')
-rw-r--r--lib/sqfs/process_block.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sqfs/process_block.c b/lib/sqfs/process_block.c
index f8b4d6c..3289767 100644
--- a/lib/sqfs/process_block.c
+++ b/lib/sqfs/process_block.c
@@ -26,8 +26,10 @@ int sqfs_block_process(sqfs_block_t *block, sqfs_compressor_t *cmp,
ret = cmp->do_block(cmp, block->data, block->size,
scratch, scratch_size);
- if (ret < 0)
+ if (ret < 0) {
+ block->flags |= SQFS_BLK_COMPRESS_ERROR;
return ret;
+ }
if (ret > 0) {
memcpy(block->data, scratch, ret);