Merge "init: fix first stage mount failure due to /dev/device-mapper not found" into oc-dev
This commit is contained in:
commit
22d73dd093
1 changed files with 5 additions and 2 deletions
|
|
@ -143,8 +143,11 @@ bool FirstStageMount::InitDevices() {
|
||||||
if (!GetRequiredDevices(&devices_partition_names, &need_dm_verity)) return false;
|
if (!GetRequiredDevices(&devices_partition_names, &need_dm_verity)) return false;
|
||||||
|
|
||||||
if (need_dm_verity) {
|
if (need_dm_verity) {
|
||||||
device_init("/sys/devices/virtual/misc/device-mapper",
|
const std::string dm_path = "/devices/virtual/misc/device-mapper";
|
||||||
[&](uevent* uevent) -> coldboot_action_t { return COLDBOOT_STOP; });
|
device_init(("/sys" + dm_path).c_str(), [&dm_path](uevent* uevent) -> coldboot_action_t {
|
||||||
|
if (uevent->path == dm_path) return COLDBOOT_STOP;
|
||||||
|
return COLDBOOT_CONTINUE; // dm_path not found, continue to find it.
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue