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

Commit 8fb49bc0 authored by Akilesh Kailash's avatar Akilesh Kailash
Browse files

libsnapshot: Wait for COW path



After mapping COW device, wait for the device to appear
before initializing it.

Bug: 305829996
Test: OTA on Pixel
Change-Id: If9e0e1ce684aa15bc9f3fd5a01e4f0421de87e81
Signed-off-by: default avatarAkilesh Kailash <akailash@google.com>
parent dfe80e48
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3513,6 +3513,11 @@ Return SnapshotManager::InitializeUpdateSnapshots(
            return Return::Error();
        }

        if (!android::fs_mgr::WaitForFile(cow_path, 6s)) {
            LOG(ERROR) << "Timed out waiting for device to appear: " << cow_path;
            return Return::Error();
        }

        if (it->second.using_snapuserd()) {
            unique_fd fd(open(cow_path.c_str(), O_RDWR | O_CLOEXEC));
            if (fd < 0) {