summaryrefslogtreecommitdiff
path: root/lib/sqfs/data_writer/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs/data_writer/common.c')
-rw-r--r--lib/sqfs/data_writer/common.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/sqfs/data_writer/common.c b/lib/sqfs/data_writer/common.c
index a19eb6d..5fe70ac 100644
--- a/lib/sqfs/data_writer/common.c
+++ b/lib/sqfs/data_writer/common.c
@@ -98,37 +98,6 @@ sqfs_block_t *data_writer_next_work_item(sqfs_data_writer_t *proc)
return blk;
}
-int data_writer_do_block(sqfs_block_t *block, sqfs_compressor_t *cmp,
- sqfs_u8 *scratch, size_t scratch_size)
-{
- ssize_t ret;
-
- if (block->size == 0) {
- block->checksum = 0;
- return 0;
- }
-
- block->checksum = crc32(0, block->data, block->size);
-
- if (block->flags & SQFS_BLK_IS_FRAGMENT)
- return 0;
-
- if (!(block->flags & SQFS_BLK_DONT_COMPRESS)) {
- ret = cmp->do_block(cmp, block->data, block->size,
- scratch, scratch_size);
- if (ret < 0)
- return ret;
-
- if (ret > 0) {
- memcpy(block->data, scratch, ret);
- block->size = ret;
- block->flags |= SQFS_BLK_IS_COMPRESSED;
- }
- }
-
- return 0;
-}
-
int sqfs_data_writer_write_fragment_table(sqfs_data_writer_t *proc,
sqfs_super_t *super)
{