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
This commit is contained in:
parent
39f11368a5
commit
5b9fd68dfa
1 changed files with 3 additions and 0 deletions
|
@ -48,6 +48,9 @@ status_t Check(const std::string& source) {
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
LOG(INFO) << "Check OK";
|
LOG(INFO) << "Check OK";
|
||||||
return 0;
|
return 0;
|
||||||
|
} else if (rc == 1) {
|
||||||
|
LOG(INFO) << "Filesystem errors corrected";
|
||||||
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
LOG(ERROR) << "Check failed (code " << rc << ")";
|
LOG(ERROR) << "Check failed (code " << rc << ")";
|
||||||
errno = EIO;
|
errno = EIO;
|
||||||
|
|
Loading…
Reference in a new issue