aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/block_processor/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqfs/block_processor/common.c')
-rw-r--r--lib/sqfs/block_processor/common.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/lib/sqfs/block_processor/common.c b/lib/sqfs/block_processor/common.c
index 806a595..23991ea 100644
--- a/lib/sqfs/block_processor/common.c
+++ b/lib/sqfs/block_processor/common.c
@@ -20,30 +20,20 @@ void free_blk_list(sqfs_block_t *list)
int block_processor_init(sqfs_block_processor_t *proc, size_t max_block_size,
sqfs_compressor_t *cmp, unsigned int num_workers,
- size_t max_backlog, size_t devblksz, sqfs_file_t *file)
+ size_t max_backlog, sqfs_block_writer_t *wr,
+ sqfs_frag_table_t *tbl)
{
proc->max_block_size = max_block_size;
proc->num_workers = num_workers;
proc->max_backlog = max_backlog;
proc->cmp = cmp;
- proc->file = file;
-
- proc->frag_tbl = sqfs_frag_table_create(0);
- if (proc->frag_tbl == NULL)
- return -1;
-
- proc->wr = sqfs_block_writer_create(file, devblksz, 0);
- if (proc->wr == NULL)
- return -1;
+ proc->frag_tbl = tbl;
+ proc->wr = wr;
return 0;
}
void block_processor_cleanup(sqfs_block_processor_t *proc)
{
- if (proc->frag_tbl != NULL)
- sqfs_frag_table_destroy(proc->frag_tbl);
- if (proc->wr != NULL)
- sqfs_block_writer_destroy(proc->wr);
free_blk_list(proc->queue);
free_blk_list(proc->done);
free(proc->blk_current);
@@ -51,13 +41,6 @@ void block_processor_cleanup(sqfs_block_processor_t *proc)
free(proc);
}
-int sqfs_block_processor_write_fragment_table(sqfs_block_processor_t *proc,
- sqfs_super_t *super)
-{
- return sqfs_frag_table_write(proc->frag_tbl, proc->file,
- super, proc->cmp);
-}
-
int sqfs_block_processor_set_hooks(sqfs_block_processor_t *proc, void *user_ptr,
const sqfs_block_hooks_t *hooks)
{