diff options
author | silver.chen <silver.chen@mediatek.com> | 2021-05-05 11:38:34 +0800 |
---|---|---|
committer | Daren Liao <daren.liao@mediatek.com> | 2021-05-05 07:16:01 +0000 |
commit | a28dd6806d037a404d6bc8c77506b134059d1b04 (patch) | |
tree | e2efaa696497cedc92627849723ef1c48b764f6c | |
parent | cab9fc3f1179b2b4b743d30e4439eb2224b71e13 (diff) | |
download | fsck_msdos-a28dd6806d037a404d6bc8c77506b134059d1b04.tar.gz |
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
-rw-r--r-- | check.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } |