Home
last modified time | relevance | path

Searched refs:slot (Results 1 – 25 of 57) sorted by relevance

123

/system/bt/btif/src/
Dbtif_sock_rfc.cc174 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()
220 slot->fd = fds[0]; in alloc_rfc_slot()
221 slot->app_fd = fds[1]; in alloc_rfc_slot()
222 slot->security = security; in alloc_rfc_slot()
223 slot->scn = channel; in alloc_rfc_slot()
224 slot->app_uid = -1; in alloc_rfc_slot()
[all …]
/system/update_engine/common/
Dfake_boot_control.h46 BootControlInterface::Slot slot, in GetPartitionDevice() argument
48 if (slot >= num_slots_) in GetPartitionDevice()
50 auto part_it = devices_[slot].find(partition_name); in GetPartitionDevice()
51 if (part_it == devices_[slot].end()) in GetPartitionDevice()
57 bool IsSlotBootable(BootControlInterface::Slot slot) const override { in IsSlotBootable() argument
58 return slot < num_slots_ && is_bootable_[slot]; in IsSlotBootable()
61 bool MarkSlotUnbootable(BootControlInterface::Slot slot) override { in MarkSlotUnbootable() argument
62 if (slot >= num_slots_) in MarkSlotUnbootable()
64 is_bootable_[slot] = false; in MarkSlotUnbootable()
68 bool SetActiveBootSlot(Slot slot) override { return true; } in SetActiveBootSlot() argument
[all …]
Dboot_control_interface.h74 Slot slot,
79 virtual bool IsSlotBootable(Slot slot) const = 0;
83 virtual bool MarkSlotUnbootable(Slot slot) = 0;
89 virtual bool SetActiveBootSlot(Slot slot) = 0;
102 Slot slot,
110 static std::string SlotName(Slot slot) { in SlotName() argument
111 if (slot == kInvalidSlot) in SlotName()
113 if (slot < 26) in SlotName()
114 return std::string(1, 'A' + slot); in SlotName()
Dboot_control_stub.h42 BootControlInterface::Slot slot,
44 bool IsSlotBootable(BootControlInterface::Slot slot) const override;
45 bool MarkSlotUnbootable(BootControlInterface::Slot slot) override;
46 bool SetActiveBootSlot(BootControlInterface::Slot slot) override;
48 bool InitPartitionMetadata(Slot slot,
Dboot_control_stub.cc35 Slot slot, in GetPartitionDevice() argument
41 bool BootControlStub::IsSlotBootable(Slot slot) const { in IsSlotBootable()
46 bool BootControlStub::MarkSlotUnbootable(Slot slot) { in MarkSlotUnbootable() argument
51 bool BootControlStub::SetActiveBootSlot(Slot slot) { in SetActiveBootSlot() argument
63 Slot slot, in InitPartitionMetadata() argument
/system/chre/apps/chqts/src/shared/
Ddumb_allocator.cc41 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 …]
Ddumb_allocator.h49 bool getSlot(const void *ptr, size_t *slot) const;
/system/nvram/core/tests/
Dfake_storage.cpp89 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/
Dbootctl.py38 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()
Dhaltest.py34 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 …]
Dbootloadertest.py126 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/nvram/hal/
Dmemory_storage.cpp64 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/
Dconfirmationui_rate_limiting.h87 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()
112 auto& slot = slots_[latest_requester_]; in processResult() local
113 if (slot.counter <= 1) { in processResult()
117 slot.counter -= 1; in processResult()
118 slot.prompt_start = slot.previous_start; in processResult()
/system/update_engine/
Dboot_control_android.cc95 bool BootControlAndroid::GetSuffix(Slot slot, string* suffix) const { in GetSuffix() argument
99 Return<void> ret = module_->getSuffix(slot, store_suffix_cb); in GetSuffix()
103 << SlotName(slot); in GetSuffix()
111 Slot slot, in IsSuperBlockDevice() argument
114 device_dir.Append(fs_mgr_get_super_partition_name(slot)).value(); in IsSuperBlockDevice()
116 source_device, slot, BootControlInterface::kInvalidSlot); in IsSuperBlockDevice()
124 Slot slot, in GetDynamicPartitionDevice() argument
127 device_dir.Append(fs_mgr_get_super_partition_name(slot)).value(); in GetDynamicPartitionDevice()
130 super_device, slot, BootControlInterface::kInvalidSlot); in GetDynamicPartitionDevice()
134 << BootControlInterface::SlotName(slot); in GetDynamicPartitionDevice()
[all …]
Dboot_control_chromeos.cc149 unsigned int slot, in GetPartitionDevice() argument
166 .Append(slot == 0 ? kPartitionNameDlcA : kPartitionNameDlcB) in GetPartitionDevice()
171 int partition_num = GetPartitionNumber(partition_name, slot); in GetPartitionDevice()
183 bool BootControlChromeOS::IsSlotBootable(Slot slot) const { in IsSlotBootable()
184 int partition_num = GetPartitionNumber(kChromeOSPartitionNameKernel, slot); in IsSlotBootable()
200 bool BootControlChromeOS::MarkSlotUnbootable(Slot slot) { in MarkSlotUnbootable() argument
201 LOG(INFO) << "Marking slot " << SlotName(slot) << " unbootable"; in MarkSlotUnbootable()
203 if (slot == current_slot_) { in MarkSlotUnbootable()
208 int partition_num = GetPartitionNumber(kChromeOSPartitionNameKernel, slot); in MarkSlotUnbootable()
233 bool BootControlChromeOS::SetActiveBootSlot(Slot slot) { in SetActiveBootSlot() argument
[all …]
Dboot_control_android.h48 BootControlInterface::Slot slot,
50 bool IsSlotBootable(BootControlInterface::Slot slot) const override;
51 bool MarkSlotUnbootable(BootControlInterface::Slot slot) override;
52 bool SetActiveBootSlot(BootControlInterface::Slot slot) override;
54 bool InitPartitionMetadata(Slot slot,
66 bool GetSuffix(Slot slot, std::string* out) const;
77 Slot slot,
83 Slot slot,
Dboot_control_chromeos.h47 BootControlInterface::Slot slot,
49 bool IsSlotBootable(BootControlInterface::Slot slot) const override;
50 bool MarkSlotUnbootable(BootControlInterface::Slot slot) override;
51 bool SetActiveBootSlot(BootControlInterface::Slot slot) override;
53 bool InitPartitionMetadata(Slot slot,
75 BootControlInterface::Slot slot) const;
Ddynamic_partition_control_android.h36 uint32_t slot,
61 uint32_t slot,
Ddynamic_partition_control_android.cc64 uint32_t slot, in MapPartitionInternal() argument
68 slot, in MapPartitionInternal()
87 uint32_t slot, in MapPartitionOnDeviceMapper() argument
120 super_device, target_partition_name, slot, force_writable, path); in MapPartitionOnDeviceMapper()
Dboot_control_android_unittest.cc129 inline string GetSuperDevice(uint32_t slot) { in GetSuperDevice() argument
130 return GetDevice(fs_mgr_get_super_partition_name(slot)); in GetSuperDevice()
271 .WillByDefault(Invoke([](auto slot, auto cb) { in SetUp() argument
272 EXPECT_LE(slot, kMaxNumSlots); in SetUp()
273 cb(slot < kMaxNumSlots ? kSlotSuffixes[slot] : ""); in SetUp()
307 void SetMetadata(uint32_t slot, const PartitionSuffixSizes& sizes) { in SetMetadata() argument
308 SetMetadata(slot, partitionSuffixSizesToMetadata(sizes)); in SetMetadata()
311 void SetMetadata(uint32_t slot, const PartitionMetadata& metadata) { in SetMetadata() argument
313 LoadMetadataBuilder(GetSuperDevice(slot), slot, _)) in SetMetadata()
382 bool InitPartitionMetadata(uint32_t slot, in InitPartitionMetadata() argument
[all …]
/system/extras/boot_control_copy/
Dboot_control_copy.cpp135 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/fastboot/
Dfastboot.cpp1029 std::string slot = slot_name; in verify_slot() local
1030 if (slot == "all") { in verify_slot()
1046 if (slot == "other") { in verify_slot()
1054 if (slot.size() == 1 && (slot[0]-'a' >= 0 && slot[0]-'a' < count)) return slot; in verify_slot()
1056 fprintf(stderr, "Slot %s does not exist. supported slots are:\n", slot.c_str()); in verify_slot()
1064 static std::string verify_slot(const std::string& slot) { in verify_slot() argument
1065 return verify_slot(slot, true); in verify_slot()
1068 static void do_for_partition(const std::string& part, const std::string& slot, in do_for_partition() argument
1078 if (slot == "") { in do_for_partition()
1085 func(part + '_' + slot); in do_for_partition()
[all …]
/system/core/fastboot/device/
Dutility.cpp136 bool GetSlotNumber(const std::string& slot, Slot* number) { in GetSlotNumber() argument
137 if (slot.size() != 1) { in GetSlotNumber()
140 if (slot[0] < 'a' || slot[0] > 'z') { in GetSlotNumber()
143 *number = slot[0] - 'a'; in GetSlotNumber()
Dvariables.cpp208 Slot slot; in GetSlotSuccessful() local
209 if (!GetSlotNumber(args[0], &slot)) { in GetSlotSuccessful()
218 if (boot_control_hal->isSlotMarkedSuccessful(slot) != BoolResult::TRUE) { in GetSlotSuccessful()
232 Slot slot; in GetSlotUnbootable() local
233 if (!GetSlotNumber(args[0], &slot)) { in GetSlotUnbootable()
242 if (boot_control_hal->isSlotBootable(slot) != BoolResult::TRUE) { in GetSlotUnbootable()
/system/core/fs_mgr/
Dfs_mgr_dm_linear.cpp142 uint32_t slot = SlotNumberForSlotSuffix(fs_mgr_get_slot_suffix()); in CreateLogicalPartitions() local
143 auto metadata = ReadMetadata(block_device.c_str(), slot); in CreateLogicalPartitions()
152 uint32_t slot = SlotNumberForSlotSuffix(fs_mgr_get_slot_suffix()); in ReadCurrentMetadata() local
153 return ReadMetadata(block_device.c_str(), slot); in ReadCurrentMetadata()

123