summaryrefslogtreecommitdiff
path: root/mkfs/options.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-11 15:04:59 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-06-11 15:06:28 +0200
commita3a47476c5ceed1688e37a5af8a5a988b504832e (patch)
treee64d9f67a34d7e56d2a5b1fcf023cbec5aa29f55 /mkfs/options.c
parentff5d648629a5076175430564dcc60da2b28d1ee1 (diff)
Cleanup dependency handling
Always try to gather all compressor libraries available, but only complain about missing a one if it has been *explicitly* selected. If a compressor has been explicityl disabled, we can still turn it off after checking. Also, rework gensquashfs to set the default compressor based on what's available. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'mkfs/options.c')
-rw-r--r--mkfs/options.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mkfs/options.c b/mkfs/options.c
index e1223ad..69e66f4 100644
--- a/mkfs/options.c
+++ b/mkfs/options.c
@@ -61,7 +61,7 @@ static const char *help_string =
"\n"
" --compressor, -c <name> Select the compressor to use.\n"
" A list of available compressors is below.\n"
-" Defaults to 'xz'.\n"
+" Defaults to '%s'.\n"
" --comp-extra, -X <options> A comma seperated list of extra options for\n"
" the selected compressor. Specify 'help' to\n"
" get a list of available options.\n"
@@ -240,7 +240,7 @@ void process_command_line(options_t *opt, int argc, char **argv)
opt->def_mode = 0755;
opt->def_mtime = 0;
opt->outmode = O_WRONLY | O_CREAT | O_EXCL;
- opt->compressor = SQFS_COMP_XZ;
+ opt->compressor = compressor_get_default();
opt->blksz = SQFS_DEFAULT_BLOCK_SIZE;
opt->devblksz = SQFS_DEVBLK_SIZE;
opt->quiet = false;
@@ -308,6 +308,7 @@ void process_command_line(options_t *opt, int argc, char **argv)
#endif
case 'h':
printf(help_string, __progname,
+ compressors[compressor_get_default()],
SQFS_DEFAULT_BLOCK_SIZE, SQFS_DEVBLK_SIZE);
fputs("Available compressors:\n", stdout);