diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-21 12:16:37 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-21 18:21:17 +0200 |
commit | c9d3c2e1628e5b28a553ae098b3b9f3019c45a63 (patch) | |
tree | a02caaa953b757bbc74793994db37f62e23690e3 /mkfs/mkfs.c | |
parent | 58ced38ac46976c1b0dfa91c513c8ccd170b4e26 (diff) |
Add command line flag for compressor options, pass them to compressors
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs/mkfs.c')
-rw-r--r-- | mkfs/mkfs.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c index dac0a34..c958d73 100644 --- a/mkfs/mkfs.c +++ b/mkfs/mkfs.c @@ -47,6 +47,12 @@ int main(int argc, char **argv) process_command_line(&info.opt, argc, argv); + if (info.opt.comp_extra != NULL && + strcmp(info.opt.comp_extra, "help") == 0) { + compressor_print_help(info.opt.compressor); + return EXIT_SUCCESS; + } + if (sqfs_super_init(&info.super, info.opt.blksz, info.opt.def_mtime, info.opt.compressor)) { return EXIT_FAILURE; @@ -85,7 +91,8 @@ int main(int argc, char **argv) fstree_sort(&info.fs); info.cmp = compressor_create(info.super.compression_id, true, - info.super.block_size); + info.super.block_size, + info.opt.comp_extra); if (info.cmp == NULL) { fputs("Error creating compressor\n", stderr); goto out_outfd; |