aboutsummaryrefslogtreecommitdiff
path: root/lib/sqfs/data_writer/block.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-01-24 16:15:07 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-01-24 16:15:55 +0100
commit7fcbe8e10ac062ac449b6d1bbcf22bfd6529d66f (patch)
treead833deaf430fac6acbd6ad66bfc0639f1540048 /lib/sqfs/data_writer/block.c
parentf7c29ffee7fdd61470fd879cfae470534423c0c7 (diff)
Cleanup: use fragment table primitive in data writer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/data_writer/block.c')
-rw-r--r--lib/sqfs/data_writer/block.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqfs/data_writer/block.c b/lib/sqfs/data_writer/block.c
index 5967e59..b45b1ff 100644
--- a/lib/sqfs/data_writer/block.c
+++ b/lib/sqfs/data_writer/block.c
@@ -111,10 +111,10 @@ int process_completed_block(sqfs_data_writer_t *proc, sqfs_block_t *blk)
offset = proc->file->get_size(proc->file);
if (blk->flags & SQFS_BLK_FRAGMENT_BLOCK) {
- offset = htole64(offset);
- proc->fragments[blk->index].start_offset = offset;
- proc->fragments[blk->index].pad0 = 0;
- proc->fragments[blk->index].size = htole32(out);
+ err = sqfs_frag_table_set(proc->frag_tbl, blk->index,
+ offset, out);
+ if (err)
+ return err;
} else {
blk->inode->extra[blk->index] = out;
}