Lines Matching refs:in_slot
67 static std::string getDevPath(int32_t in_slot) { in getDevPath() argument
70 const char *path = in_slot == 0 ? BOOT_A_PATH : BOOT_B_PATH; in getDevPath()
83 static bool isSlotFlagSet(int32_t in_slot, uint64_t flag) { in isSlotFlagSet() argument
84 std::string dev_path = getDevPath(in_slot); in isSlotFlagSet()
86 ALOGI("Could not get device path for slot %d\n", in_slot); in isSlotFlagSet()
96 gpt_entry *e = gpt.GetPartitionEntry(in_slot ? "boot_b" : "boot_a"); in isSlotFlagSet()
105 static bool setSlotFlag(int32_t in_slot, uint64_t flag) { in setSlotFlag() argument
106 std::string dev_path = getDevPath(in_slot); in setSlotFlag()
108 ALOGI("Could not get device path for slot %d\n", in_slot); in setSlotFlag()
118 gpt_entry *e = gpt.GetPartitionEntry(in_slot ? "boot_b" : "boot_a"); in setSlotFlag()
350 ScopedAStatus BootControl::getSuffix(int32_t in_slot, std::string* _aidl_return) { in getSuffix() argument
351 *_aidl_return = in_slot == 0 ? "_a" : in_slot == 1 ? "_b" : ""; in getSuffix()
355 ScopedAStatus BootControl::isSlotBootable(int32_t in_slot, bool* _aidl_return) { in isSlotBootable() argument
362 if (in_slot >= slots) in isSlotBootable()
364 INVALID_SLOT, (std::string("Invalid slot ") + std::to_string(in_slot)).c_str()); in isSlotBootable()
368 auto &slot_data = devinfo.ab_data.slots[in_slot]; in isSlotBootable()
371 unbootable = isSlotFlagSet(in_slot, AB_ATTR_UNBOOTABLE); in isSlotBootable()
378 ScopedAStatus BootControl::isSlotMarkedSuccessful(int32_t in_slot, bool* _aidl_return) { in isSlotMarkedSuccessful() argument
387 if (in_slot >= slots) in isSlotMarkedSuccessful()
389 INVALID_SLOT, (std::string("Invalid slot ") + std::to_string(in_slot)).c_str()); in isSlotMarkedSuccessful()
393 auto &slot_data = devinfo.ab_data.slots[in_slot]; in isSlotMarkedSuccessful()
396 successful = isSlotFlagSet(in_slot, AB_ATTR_SUCCESSFUL); in isSlotMarkedSuccessful()
435 ScopedAStatus BootControl::setActiveBootSlot(int32_t in_slot) { in setActiveBootSlot() argument
436 if (in_slot >= 2) { in setActiveBootSlot()
438 INVALID_SLOT, (std::string("Invalid slot ") + std::to_string(in_slot)).c_str()); in setActiveBootSlot()
442 auto &active_slot_data = devinfo.ab_data.slots[in_slot]; in setActiveBootSlot()
443 auto &inactive_slot_data = devinfo.ab_data.slots[!in_slot]; in setActiveBootSlot()
453 std::string dev_path = getDevPath(in_slot); in setActiveBootSlot()
465 gpt_entry *active_entry = gpt.GetPartitionEntry(in_slot == 0 ? "boot_a" : "boot_b"); in setActiveBootSlot()
466 gpt_entry *inactive_entry = gpt.GetPartitionEntry(in_slot == 0 ? "boot_b" : "boot_a"); in setActiveBootSlot()
512 int ret = ::android::base::WriteStringToFd(in_slot == 0 ? "1" : "2", fd); in setActiveBootSlot()
522 ScopedAStatus BootControl::setSlotAsUnbootable(int32_t in_slot) { in setSlotAsUnbootable() argument
523 if (in_slot >= 2) in setSlotAsUnbootable()
525 INVALID_SLOT, (std::string("Invalid slot ") + std::to_string(in_slot)).c_str()); in setSlotAsUnbootable()
528 auto &slot_data = devinfo.ab_data.slots[in_slot]; in setSlotAsUnbootable()
535 std::string dev_path = getDevPath(in_slot); in setSlotAsUnbootable()
544 gpt_entry *e = gpt.GetPartitionEntry(in_slot ? "boot_b" : "boot_a"); in setSlotAsUnbootable()