From a28dd6806d037a404d6bc8c77506b134059d1b04 Mon Sep 17 00:00:00 2001 From: "silver.chen" Date: Wed, 5 May 2021 11:38:34 +0800 Subject: Add aosp patch to fix filesystem check fail when mounting. Modify files: 1. external/fsck_msdos/check.c Root Cause: fsck_msdos will return 4 after repairing file system on An P. After An Q, this action become return 8, which lead to file system check failed. Solution: We manually change return value to 4 to resolve this issue. when return value is 4, vold will retry fsck multiple time, so we don't have to unplug and plug the device. Test: 1. build pass. Bug: 186611822 Change-Id: I9780b4b894463780b179cf0f6042883df0a12a71 --- check.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/check.c b/check.c index 9519315..c164316 100644 --- a/check.c +++ b/check.c @@ -186,8 +186,10 @@ checkfilesys(const char *fname) free(fat); close(dosfs); - if (mod & (FSFATMOD|FSDIRMOD)) + if (mod & (FSFATMOD|FSDIRMOD)){ pwarn("\n***** FILE SYSTEM WAS MODIFIED *****\n"); + return 4; + } return ret; } -- cgit v1.2.3