From 30e8abe86cc604672dff3896cdea2a75ed622a4f Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 24 Sep 2020 20:19:52 +0200 Subject: Update tar2sqfs/sqfs2tar documentation Modify the man pages and help texts to mention compression support, make the help option display a list of supported compressors. Also clarify the squashfs compressor list in the help text to state that the list shows block compressors supported for SquashFS compression. Signed-off-by: David Oberhollenzer --- lib/common/compress.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'lib/common') diff --git a/lib/common/compress.c b/lib/common/compress.c index f16f080..9a66095 100644 --- a/lib/common/compress.c +++ b/lib/common/compress.c @@ -46,9 +46,12 @@ void compressor_print_available(void) sqfs_compressor_config_t cfg; sqfs_compressor_t *temp; bool have_compressor; - int i, ret; + int i, ret, defcomp; + const char *name; - fputs("Available compressors:\n", stdout); + defcomp = compressor_get_default(); + + fputs("Available SquashFS block compressors:\n", stdout); for (i = SQFS_COMP_MIN; i <= SQFS_COMP_MAX; ++i) { sqfs_compressor_config_init(&cfg, i, @@ -67,10 +70,16 @@ void compressor_print_available(void) #endif } - if (have_compressor) - printf("\t%s\n", sqfs_compressor_name_from_id(i)); + if (have_compressor) { + name = sqfs_compressor_name_from_id(i); + + if (defcomp == i) { + printf("\t%s (default)\n", name); + } else { + printf("\t%s\n", name); + } + } } - printf("\nDefault compressor: %s\n", - sqfs_compressor_name_from_id(compressor_get_default())); + fputc('\n', stdout); } -- cgit v1.2.3