From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Guo Xuenan <guoxuenan@huawei.com>,
jefflexu@linux.alibaba.com, linux-erofs@lists.ozlabs.org
Cc: jack.qiu@huawei.com
Subject: Re: [PATCH 2/4] erofs-utils: lib: unify all identical compressor print function
Date: Fri, 9 Jun 2023 17:39:52 +0800 [thread overview]
Message-ID: <1532d357-0166-900c-ffb8-573d06324c02@linux.alibaba.com> (raw)
In-Reply-To: <20230609085041.14987-3-guoxuenan@huawei.com>
On 2023/6/9 16:50, Guo Xuenan via Linux-erofs wrote:
> {dump,fsck}.erofs use the same compressor print function,
> available_compressors means which algothrims are currently
> supported by binary tools.
> supported_compressors including all algothrims that are ready
> for erofs.
>
> Signed-off-by: Guo Xuenan <guoxuenan@huawei.com>
> ---
> fsck/main.c | 15 +-----------
> include/erofs/compress.h | 3 ++-
> lib/compressor.c | 51 ++++++++++++++++++++++++++--------------
> mkfs/main.c | 15 +-----------
> 4 files changed, 38 insertions(+), 46 deletions(-)
>
> diff --git a/fsck/main.c b/fsck/main.c
> index f816bec..978d198 100644
> --- a/fsck/main.c
> +++ b/fsck/main.c
> @@ -49,19 +49,6 @@ static struct option long_options[] = {
> {0, 0, 0, 0},
> };
>
> -static void print_available_decompressors(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)
> {
> fputs("usage: [options] IMAGE\n\n"
> @@ -84,7 +71,7 @@ static void usage(void)
> " --no-preserve-owner extract as yourself\n"
> " --no-preserve-perms apply user's umask when extracting permissions\n"
> "\nSupported algorithms are: ", stderr);
> - print_available_decompressors(stderr, ", ");
> + zerofs_print_available_compressors(stderr);
It'd be better to keep z_erofs for compression side.
next prev parent reply other threads:[~2023-06-09 9:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 8:50 [PATCH 0/4] erofs-utils: code-refactoring for erofs compressor Guo Xuenan via Linux-erofs
2023-06-09 8:50 ` [PATCH 1/4] erofs-utils: lib: refactor erofs compressors init Guo Xuenan via Linux-erofs
2023-06-09 9:38 ` Gao Xiang
2023-06-12 3:04 ` Guo Xuenan
2023-06-09 8:50 ` [PATCH 2/4] erofs-utils: lib: unify all identical compressor print function Guo Xuenan via Linux-erofs
2023-06-09 9:39 ` Gao Xiang [this message]
2023-06-09 8:50 ` [PATCH 3/4] erofs-utils: simplify erofs compressor init and exit Guo Xuenan via Linux-erofs
2023-06-09 8:50 ` [PATCH 4/4] erofs-utils: dump: add some superblock fields Guo Xuenan via Linux-erofs
2023-06-09 9:40 ` Gao Xiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1532d357-0166-900c-ffb8-573d06324c02@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=guoxuenan@huawei.com \
--cc=jack.qiu@huawei.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox