Handle errors corrected exit status returned by fsck
Properly handle the exit status 1, which shows filesystem errors
corrected, returned by fsck.
Test: manually hot-plugs SD card and check logcat logs
Change-Id: Iacaa8b1d1a7b59931014c1ab6a4708ffc3cd0c06
diff --git a/fs/Exfat.cpp b/fs/Exfat.cpp
index c8b19e0..ed53921 100644
--- a/fs/Exfat.cpp
+++ b/fs/Exfat.cpp
@@ -48,6 +48,9 @@
if (rc == 0) {
LOG(INFO) << "Check OK";
return 0;
+ } else if (rc == 1) {
+ LOG(INFO) << "Filesystem errors corrected";
+ return 0;
} else {
LOG(ERROR) << "Check failed (code " << rc << ")";
errno = EIO;