diff options
Diffstat (limited to 'mkfs/main.c')
-rw-r--r-- | mkfs/main.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mkfs/main.c b/mkfs/main.c index 31cf1c2..1161b3f 100644 --- a/mkfs/main.c +++ b/mkfs/main.c @@ -29,6 +29,19 @@ static struct option long_options[] = { {0, 0, 0, 0}, }; +static void print_available_compressors(FILE *f, const char *delim) +{ + unsigned int i = 0; + const char *s; + + while ((s = z_erofs_list_available_compressors(i)) != NULL) { + if (i++) + fputs(delim, f); + fputs(s, f); + } + fputc('\n', f); +} + static void usage(void) { fprintf(stderr, "usage: [options] FILE DIRECTORY\n\n"); @@ -39,6 +52,8 @@ static void usage(void) fprintf(stderr, " -EX[,...] X=extended options\n"); fprintf(stderr, " -T# set a fixed UNIX timestamp # to all files\n"); fprintf(stderr, " --help display this help and exit\n"); + fprintf(stderr, "\nAvailable compressors are: "); + print_available_compressors(stderr, ", "); } static int parse_extended_opts(const char *opts) |