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:
Jaegeuk Kim 2016-01-14 20:44:13 -08:00
parent 231fc70f6e
commit bbc4176aa7

View File

@ -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;
}