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

Commit 79f7e3f1 authored by Howard Chen's avatar Howard Chen Committed by Gerrit Code Review
Browse files

Merge "Fix the MapWithLoopDevice"

parents a1d04e4d 08deaa39
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -486,15 +486,14 @@ bool ImageManager::MapWithLoopDevice(const std::string& name,
        if (!MapWithLoopDeviceList(loop_devices, name, timeout_ms, path)) {
            return false;
        }
    }

    } else {
        auto status_message = "loop:" + loop_devices.back();
        auto status_file = GetStatusFilePath(name);
        if (!android::base::WriteStringToFile(status_message, status_file)) {
            PLOG(ERROR) << "Write failed: " << status_file;
            return false;
        }

    }
    auto_detach.Commit();

    *path = loop_devices.back();