fs_mgr: candidate list check mount_point

if we specify mount_point /vendor, candidate list should not add
/system as a candidate.  eg: adb disable-verity /vendor.

Test: manual
Bug: 109821005
Change-Id: Id4d9ee617262cf1b68a790c9c43476d0f907353a
This commit is contained in:
Mark Salyzyn 2018-08-29 10:44:33 -07:00
parent 64990d5b45
commit ea928bbc1f

View file

@ -471,6 +471,7 @@ std::vector<std::string> fs_mgr_candidate_list(const fstab* fstab,
if ((std::find(mounts.begin(), mounts.end(), "/system") == mounts.end()) &&
!fs_mgr_get_entry_for_mount_point(const_cast<struct fstab*>(fstab), "/") &&
!fs_mgr_get_entry_for_mount_point(const_cast<struct fstab*>(fstab), "/system") &&
(!mount_point || ("/system"s == mount_point)) &&
!fs_mgr_overlayfs_verity_enabled("system")) {
mounts.emplace_back("/system");
}