diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-04-30 13:29:40 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-02 12:40:06 +0200 |
commit | ea1cb44cc85e70fdeb8514fc909c54af72b1bfe9 (patch) | |
tree | bd1dbb3f8ae56b24943018a9cf6dcd95cec682fb /mkfs/mksquashfs.c | |
parent | e711928cb0931c1d14ac14cfad709c2a453d6c31 (diff) |
Pack file data and fragments
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs/mksquashfs.c')
-rw-r--r-- | mkfs/mksquashfs.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/mkfs/mksquashfs.c b/mkfs/mksquashfs.c index 65cd552..418d669 100644 --- a/mkfs/mksquashfs.c +++ b/mkfs/mksquashfs.c @@ -68,13 +68,25 @@ int main(int argc, char **argv) print_tree(0, info.fs.root); - if (sqfs_super_write(&info)) + info.cmp = compressor_create(info.super.compression_id, true, + info.super.block_size); + if (info.cmp == NULL) { + fputs("Error creating compressor\n", stderr); goto out_outfd; + } + + if (write_data_to_image(&info)) + goto out_cmp; + + if (sqfs_super_write(&info)) + goto out_cmp; if (sqfs_padd_file(&info)) - goto out_fstree; + goto out_cmp; status = EXIT_SUCCESS; +out_cmp: + info.cmp->destroy(info.cmp); out_fstree: fstree_cleanup(&info.fs); out_outfd: |