fs_mgr: overlay: preserve errno android::gsi::IsGsiRunning()

Resulted in remount reporting an mount_all failure.

Test: adb-remount-test.sh
Bug: 126256072
Change-Id: Ib9567748e5c12b047e38869c07755eb741308df4
This commit is contained in:
Mark Salyzyn 2019-03-07 12:53:19 -08:00
parent e9223204d3
commit 27c5047313
1 changed files with 4 additions and 3 deletions

View File

@ -769,9 +769,10 @@ bool fs_mgr_overlayfs_invalid() {
// in recovery, fastbootd, or gsi mode, not allowed!
if (fs_mgr_access("/system/bin/recovery")) return true;
if (android::gsi::IsGsiRunning()) return true;
return false;
auto save_errno = errno;
auto ret = android::gsi::IsGsiRunning();
errno = save_errno;
return ret;
}
} // namespace