init: overlay: allow fs_mgr_overlayfs_required_devices to report partitions
init add support for picking up partitions if specified by fs_mgr_overlayfs_required_devices() as /dev/block/by-name/<partition> Test: adb-remount-test.sh Bug: 119885423 Change-Id: I6a4c3d9b5c2b406178f0acf0a86c52ab17209537
This commit is contained in:
parent
307a41fe9f
commit
acf56c297f
|
@ -413,7 +413,14 @@ bool FirstStageMount::MountPartitions() {
|
|||
// heads up for instantiating required device(s) for overlayfs logic
|
||||
const auto devices = fs_mgr_overlayfs_required_devices(device_tree_fstab_.get());
|
||||
for (auto const& device : devices) {
|
||||
InitMappedDevice(device);
|
||||
if (android::base::StartsWith(device, "/dev/block/by-name/")) {
|
||||
required_devices_partition_names_.emplace(basename(device.c_str()));
|
||||
auto uevent_callback = [this](const Uevent& uevent) { return UeventCallback(uevent); };
|
||||
uevent_listener_.RegenerateUevents(uevent_callback);
|
||||
uevent_listener_.Poll(uevent_callback, 10s);
|
||||
} else {
|
||||
InitMappedDevice(device);
|
||||
}
|
||||
}
|
||||
|
||||
fs_mgr_overlayfs_mount_all(device_tree_fstab_.get());
|
||||
|
|
Loading…
Reference in New Issue