Lines Matching refs:Error

17     BootTarget, BootToken, Bootability, Error, Manager, OneShot, RecoveryTarget, Slot,
263 fn get_slot_by_number(&self, number: usize) -> Result<Slot, Error> { in get_slot_by_number() argument
270 .ok_or_else(|| Suffix::try_from(number).map_or(Error::Other, Error::NoSuchSlot))?; in get_slot_by_number()
302 ) -> Result<(), Error> { in set_slot_unbootable() argument
307 .ok_or(Error::NoSuchSlot(slot_suffix))?; in set_slot_unbootable()
319 fn mark_boot_attempt(&mut self) -> Result<BootToken, Error> { in mark_boot_attempt() argument
322 BootTarget::Recovery(RecoveryTarget::Dedicated) => Err(Error::OperationProhibited)?, in mark_boot_attempt()
326 .ok_or(Error::NoSuchSlot(slot.suffix))?; in mark_boot_attempt()
327 return self.take_boot_token().ok_or(Error::OperationProhibited); in mark_boot_attempt()
335 .ok_or(Error::NoSuchSlot(target_slot.suffix))?; in mark_boot_attempt()
337 Bootability::Unbootable(_) => Err(Error::OperationProhibited), in mark_boot_attempt()
341 let token = self.take_boot_token().ok_or(Error::OperationProhibited)?; in mark_boot_attempt()
345 let token = self.take_boot_token().ok_or(Error::OperationProhibited)?; in mark_boot_attempt()
351 fn set_active_slot(&mut self, slot_suffix: Suffix) -> Result<(), Error> { in set_active_slot() argument
355 .ok_or(Error::NoSuchSlot(slot_suffix))?; in set_active_slot()
374 fn set_oneshot_status(&mut self, _: OneShot) -> Result<(), Error> { in set_oneshot_status() argument
375 Err(Error::OperationProhibited) in set_oneshot_status()
533 assert_eq!(sb.mark_boot_attempt(), Err(Error::OperationProhibited)); in test_slot_mark_boot_attempt()
591 assert_eq!(sb.set_oneshot_status(oneshot), Err(Error::OperationProhibited)); in test_set_oneshot_status_unsupported()