• Home
  • Raw
  • Download

Lines Matching refs:bootctrl_module

101   struct BootControlPrivate* bootctrl_module =  in BootControlInit()  local
104 if (bootctrl_module->initialized) return; in BootControlInit()
118 bootctrl_module->current_slot = SlotSuffixToIndex(suffix_prop); in BootControlInit()
128 bootctrl_module->misc_device = strdup(device.c_str()); in BootControlInit()
139 bootctrl_module->current_slot) { in BootControlInit()
146 bootctrl_module->initialized = true; in BootControlInit()
147 bootctrl_module->num_slots = boot_ctrl.nb_slot; in BootControlInit()
150 bootctrl_module->current_slot, bootctrl_module->num_slots); in BootControlInit()
156 BootControlPrivate* const bootctrl_module = in GetNumberSlots() local
159 if (!IsInitialized(bootctrl_module)) return -1; in GetNumberSlots()
161 return bootctrl_module->num_slots; in GetNumberSlots()
165 BootControlPrivate* const bootctrl_module = in GetCurrentSlot() local
168 if (!IsInitialized(bootctrl_module)) return -1; in GetCurrentSlot()
170 return bootctrl_module->current_slot; in GetCurrentSlot()
174 BootControlPrivate* const bootctrl_module = in IsSlotMarkedSuccessful() local
177 if (!IsInitialized(bootctrl_module)) return -1; in IsSlotMarkedSuccessful()
179 if (slot >= kMaxNumSlots || slot >= bootctrl_module->num_slots) { in IsSlotMarkedSuccessful()
185 if (!LoadBootloaderControl(bootctrl_module->misc_device, &bootctrl)) in IsSlotMarkedSuccessful()
193 BootControlPrivate* const bootctrl_module = in MarkBootSuccessful() local
196 if (!IsInitialized(bootctrl_module)) return -1; in MarkBootSuccessful()
199 if (!LoadBootloaderControl(bootctrl_module->misc_device, &bootctrl)) in MarkBootSuccessful()
202 bootctrl.slot_info[bootctrl_module->current_slot].successful_boot = 1; in MarkBootSuccessful()
206 bootctrl.slot_info[bootctrl_module->current_slot].tries_remaining = 1; in MarkBootSuccessful()
207 if (!SaveBootloaderControl(bootctrl_module->misc_device, &bootctrl)) in MarkBootSuccessful()
211 bootctrl_module->current_slot); in MarkBootSuccessful()
217 BootControlPrivate* const bootctrl_module = in SetActiveBootSlot() local
220 if (!IsInitialized(bootctrl_module)) in SetActiveBootSlot()
223 if (slot >= kMaxNumSlots || slot >= bootctrl_module->num_slots) { in SetActiveBootSlot()
229 if (!LoadBootloaderControl(bootctrl_module->misc_device, &bootctrl)) in SetActiveBootSlot()
235 for (unsigned int i = 0; i < bootctrl_module->num_slots; ++i) { in SetActiveBootSlot()
252 if (slot != bootctrl_module->current_slot) in SetActiveBootSlot()
255 if (!SaveBootloaderControl(bootctrl_module->misc_device, &bootctrl)) in SetActiveBootSlot()
264 BootControlPrivate* const bootctrl_module = in SetSlotAsUnbootable() local
267 if (!IsInitialized(bootctrl_module)) in SetSlotAsUnbootable()
270 if (slot >= kMaxNumSlots || slot >= bootctrl_module->num_slots) { in SetSlotAsUnbootable()
276 if (!LoadBootloaderControl(bootctrl_module->misc_device, &bootctrl)) in SetSlotAsUnbootable()
283 if (!SaveBootloaderControl(bootctrl_module->misc_device, &bootctrl)) in SetSlotAsUnbootable()
292 BootControlPrivate* const bootctrl_module = in IsSlotBootable() local
295 if (!IsInitialized(bootctrl_module)) return -1; in IsSlotBootable()
297 if (slot >= kMaxNumSlots || slot >= bootctrl_module->num_slots) { in IsSlotBootable()
303 if (!LoadBootloaderControl(bootctrl_module->misc_device, &bootctrl)) in IsSlotBootable()
310 BootControlPrivate* const bootctrl_module = in GetSuffix() local
313 if (!IsInitialized(bootctrl_module)) return NULL; in GetSuffix()
315 if (slot >= kMaxNumSlots || slot >= bootctrl_module->num_slots) return NULL; in GetSuffix()