Merge "init: always initialize device-mapper" am: 8a3630e327

am: 506611ef99

Change-Id: Ic668ffeb8382b16f4ec52dcfa6e59f5e89656055
This commit is contained in:
Tom Cherry 2019-05-16 08:23:23 -07:00 committed by android-build-merger
commit a4e44ccda9
1 changed files with 4 additions and 12 deletions

View File

@ -276,14 +276,12 @@ bool FirstStageMount::GetDmLinearMetadataDevice() {
// required_devices_partition_names_. Found partitions will then be removed from it
// for the subsequent member function to check which devices are NOT created.
bool FirstStageMount::InitRequiredDevices() {
if (required_devices_partition_names_.empty()) {
return true;
if (!InitDeviceMapper()) {
return false;
}
if (IsDmLinearEnabled() || need_dm_verity_) {
if (!InitDeviceMapper()) {
return false;
}
if (required_devices_partition_names_.empty()) {
return true;
}
auto uevent_callback = [this](const Uevent& uevent) { return UeventCallback(uevent); };
@ -604,12 +602,6 @@ void FirstStageMount::UseGsiIfPresent() {
return;
}
// Device-mapper might not be ready if the device doesn't use DAP or verity
// (for example, hikey).
if (access("/dev/device-mapper", F_OK) && !InitDeviceMapper()) {
return;
}
// Find the name of the super partition for the GSI. It will either be
// "userdata", or a block device such as an sdcard. There are no by-name
// partitions other than userdata that we support installing GSIs to.