Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acf56c29 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

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
parent 307a41fe
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -413,8 +413,15 @@ 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) {
        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());