Linux-EROFS Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: linux-erofs@lists.ozlabs.org
Cc: Gao Xiang <hsiangkao@linux.alibaba.com>
Subject: [PATCH 2/2] erofs-utils: fsck: use "--extract" instead of "-c"
Date: Wed, 10 Nov 2021 14:50:08 +0800	[thread overview]
Message-ID: <20211110065008.182193-1-hsiangkao@linux.alibaba.com> (raw)
In-Reply-To: <20211110064931.181727-1-hsiangkao@linux.alibaba.com>

Keep in sync with fsck.cramfs naming.

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
---
 fsck/main.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/fsck/main.c b/fsck/main.c
index d05dd55833aa..ae6c00202a69 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -23,6 +23,7 @@ static struct erofsfsck_cfg fsckcfg;
 
 static struct option long_options[] = {
 	{"help", no_argument, 0, 1},
+	{"extract", no_argument, 0, 2},
 	{0, 0, 0, 0},
 };
 
@@ -30,11 +31,11 @@ static void usage(void)
 {
 	fputs("usage: [options] IMAGE\n\n"
 	      "Check erofs filesystem integrity of IMAGE, and [options] are:\n"
-	      " -V      print the version number of fsck.erofs and exit.\n"
-	      " -d#     set output message level to # (maximum 9)\n"
-	      " -p      print total compression ratio of all files\n"
-	      " -c      check if all compressed files are well decompressed\n"
-	      " --help  display this help and exit.\n",
+	      " -V              print the version number of fsck.erofs and exit.\n"
+	      " -d#             set output message level to # (maximum 9)\n"
+	      " -p              print total compression ratio of all files\n"
+	      " --extract       check if all files are well decoded\n"
+	      " --help          display this help and exit.\n",
 	      stderr);
 }
 
@@ -47,7 +48,7 @@ static int erofsfsck_parse_options_cfg(int argc, char **argv)
 {
 	int opt, i;
 
-	while ((opt = getopt_long(argc, argv, "Vd:pc",
+	while ((opt = getopt_long(argc, argv, "Vd:p",
 				  long_options, NULL)) != -1) {
 		switch (opt) {
 		case 'V':
@@ -64,12 +65,12 @@ static int erofsfsck_parse_options_cfg(int argc, char **argv)
 		case 'p':
 			fsckcfg.print_comp_ratio = true;
 			break;
-		case 'c':
-			fsckcfg.check_decomp = true;
-			break;
 		case 1:
 			usage();
 			exit(0);
+		case 2:
+			fsckcfg.check_decomp = true;
+			break;
 		default:
 			return -EINVAL;
 		}
-- 
2.24.4


  reply	other threads:[~2021-11-10  6:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10  6:49 [PATCH 1/2] AOSP: erofs-utils: avoid lzma inclusion when liblzma is disabled Gao Xiang
2021-11-10  6:50 ` Gao Xiang [this message]
2021-11-10  9:51 ` Yue Hu
2021-11-10 15:52   ` Daeho Jeong via Linux-erofs

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=20211110065008.182193-1-hsiangkao@linux.alibaba.com \
    --to=hsiangkao@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