mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 10:10:00 +00:00
fsck.f2fs: return 0 for no error was reported
When skipping fsck, return 0 with message. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
231fc70f6e
commit
bbc4176aa7
12
fsck/main.c
12
fsck/main.c
@ -330,8 +330,13 @@ fsck_again:
|
||||
sbi = &gfsck.sbi;
|
||||
|
||||
ret = f2fs_do_mount(sbi);
|
||||
if (ret != 0)
|
||||
if (ret != 0) {
|
||||
if (ret == 1) {
|
||||
MSG(0, "Info: No error was reported\n");
|
||||
ret = 0;
|
||||
}
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
switch (config.func) {
|
||||
case FSCK:
|
||||
@ -341,7 +346,8 @@ fsck_again:
|
||||
do_dump(sbi);
|
||||
break;
|
||||
case DEFRAG:
|
||||
if (do_defrag(sbi))
|
||||
ret = do_defrag(sbi);
|
||||
if (ret)
|
||||
goto out_err;
|
||||
break;
|
||||
}
|
||||
@ -376,5 +382,5 @@ out_err:
|
||||
free(sbi->ckpt);
|
||||
if (sbi->raw_super)
|
||||
free(sbi->raw_super);
|
||||
return -1;
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user