Merge "first_stage_mount: Fix log typo "check_at_most_once"" am: 4bc5277152

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2146961

Change-Id: Id41980ebd8e4ec7353def81828f0138374858a49
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2022-07-18 06:18:51 +00:00 committed by Automerger Merge Worker
commit f8415fdc19

View file

@ -507,16 +507,16 @@ bool FirstStageMount::TrySwitchSystemAsRoot() {
SaveRamdiskPathToSnapuserd();
}
if (MountPartition(system_partition, false /* erase_same_mounts */)) {
if (dsu_not_on_userdata_ && fs_mgr_verity_is_check_at_most_once(*system_partition)) {
LOG(ERROR) << "check_most_at_once forbidden on external media";
return false;
}
SwitchRoot("/system");
} else {
if (!MountPartition(system_partition, false /* erase_same_mounts */)) {
PLOG(ERROR) << "Failed to mount /system";
return false;
}
if (dsu_not_on_userdata_ && fs_mgr_verity_is_check_at_most_once(*system_partition)) {
LOG(ERROR) << "check_at_most_once forbidden on external media";
return false;
}
SwitchRoot("/system");
return true;
}