From 3e855e9c2120b201d195f89feeb1f3246bdf89b7 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Mon, 30 Apr 2018 05:57:55 +0000 Subject: [PATCH] Don't bail out from the check if readboot() returns !FSFATAL. This can happen when the fsinfo signature is invalid, and the user have choose to fix it, in which case the code would return FSBOOTMOD (not FSOK but not FSFATAL either). All other (fatal) cases would return FSFATAL. Obtained from: Android Open Source Project Obtained from: https://android.googlesource.com/platform/external/fsck_msdos/+/d8775a29ea7eac2e5f1504dd21da3725b93b3036 MFC after: 2 weeks --- sbin/fsck_msdosfs/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/fsck_msdosfs/check.c b/sbin/fsck_msdosfs/check.c index 6d027bbcebe5..2431bd38dd66 100644 --- a/sbin/fsck_msdosfs/check.c +++ b/sbin/fsck_msdosfs/check.c @@ -74,7 +74,7 @@ checkfilesys(const char *fname) return 8; } - if (readboot(dosfs, &boot) != FSOK) { + if (readboot(dosfs, &boot) == FSFATAL) { close(dosfs); printf("\n"); return 8;