mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-26 19:51:32 +00:00
f2fs-toos: fsck.f2fs Fix bad return value
commit ca0ed8a66f
category: bugfix
issue: #I6VAS0
CVE: NA
Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------
'ret' should not have been used here: otherwise, it would be wrongly used
as the error code and then be returned from main().
Signed-off-by: Robin Hsu <robinhsu@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
This commit is contained in:
parent
061536fa27
commit
ad9ff71f6f
@ -3146,10 +3146,11 @@ int fsck_verify(struct f2fs_sb_info *sbi)
|
||||
#ifndef WITH_ANDROID
|
||||
if (nr_unref_nid && !c.ro) {
|
||||
char ans[255] = {0};
|
||||
int res;
|
||||
|
||||
printf("\nDo you want to restore lost files into ./lost_found/? [Y/N] ");
|
||||
ret = scanf("%s", ans);
|
||||
ASSERT(ret >= 0);
|
||||
res = scanf("%s", ans);
|
||||
ASSERT(res >= 0);
|
||||
if (!strcasecmp(ans, "y")) {
|
||||
for (i = 0; i < fsck->nr_nat_entries; i++) {
|
||||
if (f2fs_test_bit(i, fsck->nat_area_bitmap))
|
||||
|
Loading…
Reference in New Issue
Block a user