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

Commit f8728eb0 authored by David Anderson's avatar David Anderson Committed by android-build-merger
Browse files

Merge "fastbootd: Complete the implementation of getvar has-slot." am: 1e6a318b am: 03241179

am: 5029868f

Change-Id: Ib10249fe15d965bdfbc81c080885cef0a7bc6894
parents 86008076 5029868f
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -123,10 +123,14 @@ bool GetHasSlot(FastbootDevice* device, const std::vector<std::string>& args) {
    }
    std::string slot_suffix = device->GetCurrentSlot();
    if (slot_suffix.empty()) {
        return device->WriteFail("Invalid slot");
        return device->WriteOkay("no");
    }
    std::string result = (args[0] == "userdata" ? "no" : "yes");
    return device->WriteOkay(result);
    std::string partition_name = args[0] + slot_suffix;
    if (FindPhysicalPartition(partition_name) ||
        LogicalPartitionExists(partition_name, slot_suffix)) {
        return device->WriteOkay("yes");
    }
    return device->WriteOkay("no");
}

bool GetPartitionSize(FastbootDevice* device, const std::vector<std::string>& args) {