Lines Matching refs:Error
21 BootTarget, BootToken, Bootability, Error, Manager, OneShot, RecoveryTarget, Slot,
162 fn get_slot_by_number(&self, number: usize) -> Result<Slot, Error> { in get_slot_by_number() argument
166 .ok_or_else(|| Suffix::try_from(number).map_or(Error::Other, Error::NoSuchSlot))?; in get_slot_by_number()
194 ) -> Result<(), Error> { in set_slot_unbootable() argument
209 fn mark_boot_attempt(&mut self) -> Result<BootToken, Error> { in mark_boot_attempt() argument
217 BootTarget::Recovery(RecoveryTarget::Slotted(_)) => Err(Error::OperationProhibited)?, in mark_boot_attempt()
221 return self.take_boot_token().ok_or(Error::OperationProhibited); in mark_boot_attempt()
228 Bootability::Unbootable(_) => Err(Error::OperationProhibited), in mark_boot_attempt()
235 let token = self.take_boot_token().ok_or(Error::OperationProhibited)?; in mark_boot_attempt()
239 let token = self.take_boot_token().ok_or(Error::OperationProhibited)?; in mark_boot_attempt()
245 fn set_active_slot(&mut self, slot_suffix: Suffix) -> Result<(), Error> { in set_active_slot() argument
263 fn set_oneshot_status(&mut self, oneshot: OneShot) -> Result<(), Error> { in set_oneshot_status() argument
271 OneShot::Continue(RecoveryTarget::Slotted(_)) => Error::OperationProhibited, in set_oneshot_status()
272 _ => Error::Other, in set_oneshot_status()
292 fn get_index_and_slot_with_suffix(&self, slot_suffix: Suffix) -> Result<(usize, Slot), Error> { in get_index_and_slot_with_suffix() argument
296 .ok_or(Error::NoSuchSlot(slot_suffix)) in get_index_and_slot_with_suffix()
383 assert_eq!(sb.mark_boot_attempt(), Err(Error::OperationProhibited)); in test_slot_mark_boot_attempt()
439 assert_eq!(sb.mark_boot_attempt(), Err(Error::OperationProhibited)); in test_slot_mark_tried_recovery()
510 assert_eq!(sb.set_active_slot(bad_suffix), Err(Error::NoSuchSlot(bad_suffix))); in test_set_active_slot_no_such_slot()
567 Err(Error::OperationProhibited) in test_set_oneshot_mistaken_recovery_slotted()