aboutsummaryrefslogtreecommitdiff
path: root/fsck/main.c
diff options
context:
space:
mode:
authorGao Xiang <hsiangkao@linux.alibaba.com>2021-11-10 14:50:08 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2021-11-10 23:37:07 +0800
commitfddb9155f7971d09b63aab39bbdb1b9285e30d85 (patch)
tree6ead4a97f98d81ce3aec30b4107c3ee2153444fd /fsck/main.c
parent21db2743bd3f64ca3b6a1d7d591392f457539e0f (diff)
downloaderofs-utils-fddb9155f7971d09b63aab39bbdb1b9285e30d85.tar.gz
erofs-utils: fsck: use "--extract" instead of "-c"
Keep in sync with fsck.cramfs naming. Link: https://lore.kernel.org/r/20211110065008.182193-1-hsiangkao@linux.alibaba.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fsck/main.c')
-rw-r--r--fsck/main.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/fsck/main.c b/fsck/main.c
index d05dd55..d81d600 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 encoded\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;
}