/system/bt/btif/src/ |
D | btif_sock_rfc.cc | 174 int slot = -1; in find_rfc_slot_by_pending_sdp() local 179 slot = i; in find_rfc_slot_by_pending_sdp() 182 return (slot == -1) ? NULL : &rfc_slots[slot]; in find_rfc_slot_by_pending_sdp() 204 rfc_slot_t* slot = find_free_slot(); in alloc_rfc_slot() local 205 if (!slot) { in alloc_rfc_slot() 219 slot->fd = fds[0]; in alloc_rfc_slot() 220 slot->app_fd = fds[1]; in alloc_rfc_slot() 221 slot->security = security; in alloc_rfc_slot() 222 slot->scn = channel; in alloc_rfc_slot() 223 slot->app_uid = -1; in alloc_rfc_slot() [all …]
|
/system/update_engine/common/ |
D | fake_boot_control.h | 50 BootControlInterface::Slot slot, in GetPartitionDevice() argument 54 if (slot >= num_slots_) in GetPartitionDevice() 56 auto part_it = devices_[slot].find(partition_name); in GetPartitionDevice() 57 if (part_it == devices_[slot].end()) in GetPartitionDevice() 64 BootControlInterface::Slot slot, in GetPartitionDevice() argument 66 return GetPartitionDevice(partition_name, slot, false, device, nullptr); in GetPartitionDevice() 69 bool IsSlotBootable(BootControlInterface::Slot slot) const override { in IsSlotBootable() argument 70 return slot < num_slots_ && is_bootable_[slot]; in IsSlotBootable() 73 bool MarkSlotUnbootable(BootControlInterface::Slot slot) override { in MarkSlotUnbootable() argument 74 if (slot >= num_slots_) in MarkSlotUnbootable() [all …]
|
D | boot_control_interface.h | 67 Slot slot, 75 Slot slot, 80 virtual bool IsSlotBootable(Slot slot) const = 0; 84 virtual bool MarkSlotUnbootable(Slot slot) = 0; 90 virtual bool SetActiveBootSlot(Slot slot) = 0; 99 virtual bool IsSlotMarkedSuccessful(Slot slot) const = 0; 105 static std::string SlotName(Slot slot) { in SlotName() argument 106 if (slot == kInvalidSlot) in SlotName() 108 if (slot < 26) in SlotName() 109 return std::string(1, 'A' + slot); in SlotName()
|
D | boot_control_stub.h | 44 Slot slot, 49 BootControlInterface::Slot slot, 51 bool IsSlotBootable(BootControlInterface::Slot slot) const override; 52 bool MarkSlotUnbootable(BootControlInterface::Slot slot) override; 53 bool SetActiveBootSlot(BootControlInterface::Slot slot) override; 55 bool IsSlotMarkedSuccessful(BootControlInterface::Slot slot) const override;
|
D | boot_control_stub.cc | 39 BootControlInterface::Slot slot, in GetPartitionDevice() argument 48 Slot slot, in GetPartitionDevice() argument 54 bool BootControlStub::IsSlotBootable(Slot slot) const { in IsSlotBootable() 59 bool BootControlStub::MarkSlotUnbootable(Slot slot) { in MarkSlotUnbootable() argument 64 bool BootControlStub::SetActiveBootSlot(Slot slot) { in SetActiveBootSlot() argument 75 bool BootControlStub::IsSlotMarkedSuccessful(Slot slot) const { in IsSlotMarkedSuccessful()
|
/system/chre/apps/chqts/src/shared/ |
D | dumb_allocator.cc | 41 size_t slot = 0; in alloc() local 42 for (uint32_t mask = 1; slot < mSlotCount; slot++, mask <<= 1) { in alloc() 49 if (slot == mSlotCount) { in alloc() 53 return mRawMemory + (slot * mAllocSize); in alloc() 57 size_t slot; in free() local 58 if (!getSlot(pointer, &slot)) { in free() 61 mAllocatedSlots &= ~(1 << slot); in free() 66 size_t slot; in contains() local 67 return getSlot(pointer, &slot); in contains() 70 bool DumbAllocatorBase::getSlot(const void *pointer, size_t *slot) const { in getSlot() [all …]
|
/system/nvram/core/tests/ |
D | fake_storage.cpp | 89 StorageSlot slot; member 98 if (g_spaces[i].slot.present() && g_spaces[i].index == index) { in FindSlotForIndex() 99 return &g_spaces[i].slot; in FindSlotForIndex() 109 StorageSlot* slot = FindSlotForIndex(index); in FindOrCreateSlotForIndex() local 110 if (slot) { in FindOrCreateSlotForIndex() 111 return slot; in FindOrCreateSlotForIndex() 116 if (!g_spaces[i].slot.present()) { in FindOrCreateSlotForIndex() 118 return &g_spaces[i].slot; in FindOrCreateSlotForIndex() 144 StorageSlot* slot = FindSlotForIndex(index); in LoadSpace() local 145 return slot ? slot->Load(blob) : Status::kNotFound; in LoadSpace() [all …]
|
/system/extras/tests/bootloader/ |
D | bootctl.py | 38 def set_active_boot_slot(self, slot): argument 41 return self._exec("set-active-boot-slot " + str(slot))[0] == 0 43 def set_slot_as_unbootable_slot(self, slot): argument 46 return self._exec("set-slot-as-unbootable " + str(slot))[0] == 0 48 def is_slot_bootable(self, slot): argument 51 return self._exec("is-slot-bootable " + str(slot))[0] == 0 53 def is_slot_marked_successful(self, slot): argument 56 return self._exec("is-slot-marked-successful " + str(slot))[0] == 0 58 def get_suffix(self, slot): argument 61 return self._exec("get-suffix " + str(slot))[1].strip()
|
D | haltest.py | 34 for slot in range(num_slots): 35 suffix = self.bootctl.get_suffix(slot) 37 suffixes[suffix] = slot 49 slot = self.bootctl.get_current_slot() 50 self.assertTrue(self.bootctl.set_active_boot_slot(slot)) 51 self.assertFalse(self.bootctl.is_slot_marked_successful(slot)) 53 self.assertTrue(self.bootctl.is_slot_marked_successful(slot)) 58 self.assertTrue(self.bootctl.is_slot_marked_successful(slot)) 71 slot = self.bootctl.get_current_slot() 72 new_slot = (slot + 1) % num_slots [all …]
|
D | bootloadertest.py | 126 for slot in slots: 127 self.exists_yes_no("slot-unbootable:"+slot, var_all) 128 self.exists_yes_no("slot-unbootable:"+slot, var_all) 129 self.exists_integer("slot-retry-count:"+slot, var_all) 166 for slot in slots: 167 self.get_exists_yes_no("slot-unbootable:"+slot) 168 self.get_exists_yes_no("slot-successful:"+slot) 169 self.get_exists_integer("slot-retry-count:"+slot) 180 for slot in slots: 181 self.fastboot.set_active(slot) [all …]
|
/system/update_engine/ |
D | boot_control_android.cc | 86 BootControlInterface::Slot slot, in GetPartitionDevice() argument 91 slot, in GetPartitionDevice() 99 BootControlInterface::Slot slot, in GetPartitionDevice() argument 102 partition_name, slot, false /* not_in_payload */, device, nullptr); in GetPartitionDevice() 105 bool BootControlAndroid::IsSlotBootable(Slot slot) const { in IsSlotBootable() 106 Return<BoolResult> ret = module_->isSlotBootable(slot); in IsSlotBootable() 108 LOG(ERROR) << "Unable to determine if slot " << SlotName(slot) in IsSlotBootable() 113 LOG(ERROR) << "Invalid slot: " << SlotName(slot); in IsSlotBootable() 119 bool BootControlAndroid::MarkSlotUnbootable(Slot slot) { in MarkSlotUnbootable() argument 121 auto ret = module_->setSlotAsUnbootable(slot, StoreResultCallback(&result)); in MarkSlotUnbootable() [all …]
|
D | boot_control_chromeos.cc | 180 BootControlInterface::Slot slot, in GetPartitionDevice() argument 195 .Append(slot == 0 ? kPartitionNameDlcA : kPartitionNameDlcB) in GetPartitionDevice() 200 int partition_num = GetPartitionNumber(partition_name, slot); in GetPartitionDevice() 216 BootControlInterface::Slot slot, in GetPartitionDevice() argument 218 return GetPartitionDevice(partition_name, slot, false, device, nullptr); in GetPartitionDevice() 221 bool BootControlChromeOS::IsSlotBootable(Slot slot) const { in IsSlotBootable() 222 int partition_num = GetPartitionNumber(kChromeOSPartitionNameKernel, slot); in IsSlotBootable() 238 bool BootControlChromeOS::MarkSlotUnbootable(Slot slot) { in MarkSlotUnbootable() argument 239 LOG(INFO) << "Marking slot " << SlotName(slot) << " unbootable"; in MarkSlotUnbootable() 241 if (slot == current_slot_) { in MarkSlotUnbootable() [all …]
|
D | boot_control_chromeos.h | 49 BootControlInterface::Slot slot, 54 BootControlInterface::Slot slot, 56 bool IsSlotBootable(BootControlInterface::Slot slot) const override; 57 bool MarkSlotUnbootable(BootControlInterface::Slot slot) override; 58 bool SetActiveBootSlot(BootControlInterface::Slot slot) override; 60 bool IsSlotMarkedSuccessful(BootControlInterface::Slot slot) const override; 81 BootControlInterface::Slot slot) const;
|
D | boot_control_android.h | 48 BootControlInterface::Slot slot, 53 BootControlInterface::Slot slot, 55 bool IsSlotBootable(BootControlInterface::Slot slot) const override; 56 bool MarkSlotUnbootable(BootControlInterface::Slot slot) override; 57 bool SetActiveBootSlot(BootControlInterface::Slot slot) override; 59 bool IsSlotMarkedSuccessful(BootControlInterface::Slot slot) const override;
|
D | dynamic_partition_control_android.h | 73 uint32_t slot, 80 uint32_t slot, 95 const std::string& super_device, uint32_t slot); 121 uint32_t slot, 141 virtual std::string GetSuperPartitionName(uint32_t slot); 202 uint32_t slot, 232 uint32_t slot,
|
D | dynamic_partition_control_android.cc | 150 uint32_t slot, in MapPartitionInternal() argument 155 .metadata_slot = slot, in MapPartitionInternal() 189 uint32_t slot, in MapPartitionOnDeviceMapper() argument 222 super_device, target_partition_name, slot, force_writable, path); in MapPartitionOnDeviceMapper() 296 const std::string& super_device, uint32_t slot) { in LoadMetadataBuilder() argument 297 auto builder = MetadataBuilder::New(PartitionOpener(), super_device, slot); in LoadMetadataBuilder() 299 LOG(WARNING) << "No metadata slot " << BootControlInterface::SlotName(slot) in LoadMetadataBuilder() 304 << BootControlInterface::SlotName(slot) << " in " << super_device; in LoadMetadataBuilder() 787 uint32_t slot) { in GetSuperPartitionName() argument 788 return fs_mgr_get_super_partition_name(slot); in GetSuperPartitionName() [all …]
|
/system/nvram/hal/ |
D | memory_storage.cpp | 64 StorageSlot slot; member 71 if (g_spaces[i].slot.present() && g_spaces[i].index == index) { in FindSpaceSlot() 72 return &g_spaces[i].slot; in FindSpaceSlot() 90 StorageSlot* slot = FindSpaceSlot(index); in LoadSpace() local 91 return slot ? slot->Load(blob) : Status::kNotFound; in LoadSpace() 95 StorageSlot* slot = FindSpaceSlot(index); in StoreSpace() local 96 if (slot) { in StoreSpace() 97 return slot->Store(blob); in StoreSpace() 102 if (!g_spaces[i].slot.present()) { in StoreSpace() 104 return g_spaces[i].slot.Store(blob); in StoreSpace() [all …]
|
/system/security/keystore/ |
D | confirmationui_rate_limiting.h | 87 auto& slot = slots_[id]; in tryPrompt() local 89 if (!slot.counter || slot.prompt_start <= now - getBackoff(slot.counter)) { in tryPrompt() 91 slot.counter += 1; in tryPrompt() 92 slot.previous_start = slot.prompt_start; in tryPrompt() 93 slot.prompt_start = now; in tryPrompt() 122 auto& slot = slots_[latest_requester_]; in processResult() local 123 if (slot.counter <= 1) { in processResult() 127 slot.counter -= 1; in processResult() 128 slot.prompt_start = slot.previous_start; in processResult()
|
/system/extras/boot_control_copy/ |
D | boot_control_copy.cpp | 135 int module_setActiveBootSlot(boot_control_module_t *module, unsigned slot) in module_setActiveBootSlot() argument 142 if (slot >= 2) in module_setActiveBootSlot() 155 info.active_slot = slot; in module_setActiveBootSlot() 156 info.slot_info[slot].bootable = true; in module_setActiveBootSlot() 159 "_%c", slot + 'a'); in module_setActiveBootSlot() 167 snprintf(src_name, sizeof(src_name), "boot_%c", slot + 'a'); in module_setActiveBootSlot() 208 int module_setSlotAsUnbootable(struct boot_control_module *module, unsigned slot) in module_setSlotAsUnbootable() argument 212 if (slot >= 2) in module_setSlotAsUnbootable() 225 info.slot_info[slot].bootable = false; in module_setSlotAsUnbootable() 235 int module_isSlotBootable(struct boot_control_module *module, unsigned slot) in module_isSlotBootable() argument [all …]
|
/system/core/fs_mgr/libsnapshot/ |
D | device_info.cpp | 57 std::string DeviceInfo::GetSuperDevice(uint32_t slot) const { in GetSuperDevice() 58 return fs_mgr_get_super_partition_name(slot); in GetSuperDevice() 103 bool DeviceInfo::SetSlotAsUnbootable([[maybe_unused]] unsigned int slot) { in SetSlotAsUnbootable() argument 111 boot_control_->setSlotAsUnbootable(slot, cb); in SetSlotAsUnbootable() 113 LOG(ERROR) << "Error setting slot " << slot << " unbootable: " << result.errMsg; in SetSlotAsUnbootable()
|
D | device_info.h | 37 std::string GetSuperDevice(uint32_t slot) const override; 40 bool SetSlotAsUnbootable(unsigned int slot) override;
|
/system/extras/partition_tools/ |
D | lpdump.cc | 117 static std::string GetSuperPartitionName(const std::optional<uint32_t>& slot = {}) { in GetSuperPartitionName() argument 122 if (slot.has_value()) { 123 return super_partition + SlotSuffixForSlotNumber(slot.value()); 383 static std::unique_ptr<LpMetadata> ReadDeviceOrFile(const std::string& path, uint32_t slot) { in ReadDeviceOrFile() argument 387 return ReadMetadata(path, slot); in ReadDeviceOrFile() 411 std::optional<uint32_t> slot; in LpdumpMain() local 423 slot = slot_arg; in LpdumpMain() 425 slot = SlotNumberForSlotSuffix(optarg); in LpdumpMain() 445 if (slot.has_value()) { in LpdumpMain() 455 slot = 0; in LpdumpMain() [all …]
|
/system/core/fs_mgr/ |
D | fs_mgr_dm_linear.cpp | 140 uint32_t slot = SlotNumberForSlotSuffix(fs_mgr_get_slot_suffix()); in CreateLogicalPartitions() local 141 auto metadata = ReadMetadata(block_device.c_str(), slot); in CreateLogicalPartitions() 150 uint32_t slot = SlotNumberForSlotSuffix(fs_mgr_get_slot_suffix()); in ReadCurrentMetadata() local 151 return ReadMetadata(block_device.c_str(), slot); in ReadCurrentMetadata() 197 auto slot = *metadata_slot; in InitDefaults() local 198 if (owned->metadata = ReadMetadata(*partition_opener, block_device, slot); in InitDefaults()
|
/system/core/fs_mgr/libsnapshot/include/libsnapshot/ |
D | mock_device_info.h | 29 MOCK_METHOD(std::string, GetSuperDevice, (uint32_t slot), (const, override)); 33 MOCK_METHOD(bool, SetSlotAsUnbootable, (unsigned int slot), (override));
|
/system/core/fs_mgr/libsnapshot/include_test/libsnapshot/ |
D | test_helpers.h | 84 std::string GetSuperDevice([[maybe_unused]] uint32_t slot) const override { return "super"; } in GetSuperDevice() argument 94 bool SetSlotAsUnbootable(unsigned int slot) override { in SetSlotAsUnbootable() argument 95 unbootable_slots_.insert(slot); in SetSlotAsUnbootable() 99 bool IsSlotUnbootable(uint32_t slot) { return unbootable_slots_.count(slot) != 0; } in IsSlotUnbootable() argument
|