Home
last modified time | relevance | path

Searched refs:Error (Results 1 – 15 of 15) sorted by relevance

/bootable/libbootloader/gbl/libgbl/src/
Derror.rs28 pub enum Error { enum
33 Error, enumerator
49 impl Display for Error { implementation
52 Error::ArithmeticOverflow => write!(f, "Arithmetic Overflow"), in fmt()
53 Error::BootFailed => write!(f, "Failed to boot"), in fmt()
54 Error::Error => write!(f, "Generic error"), in fmt()
55 Error::MissingImage => write!(f, "Missing image required to boot system"), in fmt()
56 Error::NotImplemented => write!(f, "Functionality is not implemented"), in fmt()
57 Error::OperationProhibited => write!(f, "Operation is prohibited"), in fmt()
58 Error::Internal => write!(f, "Internal error"), in fmt()
[all …]
Dslots.rs85 type Error = Error; typedef
87 fn try_from(value: usize) -> Result<Self, Self::Error> { in try_from() argument
88 u32::try_from(value).ok().and_then(char::from_u32).ok_or(Error::Other).map(Self) in try_from()
265 fn get_slot_by_number(&self, number: usize) -> Result<Slot, Error>; in get_slot_by_number() argument
271 pub enum Error { enum
356 fn mark_boot_attempt(&mut self) -> Result<BootToken, Error>; in mark_boot_attempt() argument
363 fn set_active_slot(&mut self, slot_suffix: Suffix) -> Result<(), Error>; in set_active_slot() argument
370 ) -> Result<(), Error>; in set_slot_unbootable() argument
394 fn set_oneshot_status(&mut self, _: OneShot) -> Result<(), Error> { in set_oneshot_status() argument
395 Err(Error::OperationProhibited) in set_oneshot_status()
Dops.rs20 use crate::error::{Error, Result as GblResult};
107 Err(Error::NotImplemented.into()) in do_fastboot()
114 Err(Error::NotImplemented.into()) in gbl_alloc_extra_action()
123 Err(Error::OperationProhibited.into()) in load_slot_interface()
188 self.ops.console_put_char(*ch).map_err(|_| core::fmt::Error {})?; in write_str()
Dlib.rs61 pub use error::{Error, IntegrationError, Result};
255 let boot_token = BOOT_TOKEN.lock().take().ok_or(Error::OperationProhibited)?; in load_slot_interface()
258 .map_err(|_| Error::OperationProhibited.into()) in load_slot_interface()
466 Err(IntegrationError::GblNativeError(Error::NotImplemented)) => (), in lvb_inner()
505 let boot_image = boot_image.ok_or(Error::MissingImage)?; in lvb_inner()
506 let vendor_boot_image = vendor_boot_image.ok_or(Error::MissingImage)?; in lvb_inner()
507 let init_boot_image = init_boot_image.ok_or(Error::MissingImage)?; in lvb_inner()
516 return Err(IntegrationError::GblNativeError(Error::BufferOverlap)); in lvb_inner()
532 let token = slot_cursor.ctx.mark_boot_attempt().map_err(|_| Error::OperationProhibited)?; in lvb_inner()
548 .or(Err(Error::ArithmeticOverflow))?; in zircon_load_and_boot()
[all …]
/bootable/libbootloader/gbl/libabr/src/
Dlib.rs36 pub enum Error { enum
44 impl From<Option<&'static str>> for Error { implementation
46 Error::OpsError(val) in from()
106 type Error = Error; typedef
108 fn try_from(val: c_uint) -> core::result::Result<SlotIndex, Self::Error> { in try_from() argument
113 _ => Err(Error::InvalidData), in try_from()
132 pub type AbrResult<T> = Result<T, Error>;
263 return Err(Error::BadMagic); in deserialize()
267 return Err(Error::BadChecksum); in deserialize()
271 return Err(Error::UnsupportedVersion); in deserialize()
[all …]
Dc_staticlib.rs22 set_one_shot_recovery, AbrResult, Error, Ops, SlotIndex, SlotInfo as AbrSlotInfo, SlotState,
157 Error::BadMagic | Error::BadChecksum | Error::InvalidData => { in unpack_result()
160 Error::UnsupportedVersion => ABR_RESULT_ERR_UNSUPPORTED_VERSION, in unpack_result()
161 Error::OpsError(_) => ABR_RESULT_ERR_IO, in unpack_result()
/bootable/libbootloader/gbl/libgbl/src/slots/
Dandroid.rs17 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()
[all …]
Dfuchsia.rs21 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()
[all …]
/bootable/libbootloader/gbl/libefi/src/protocol/
Dsimple_text_output.rs56 self.output_string(char16_msg.as_mut_ptr()).map_err(|_| core::fmt::Error {})?; in write_str()
64 impl From<core::fmt::Error> for EfiError {
65 fn from(_: core::fmt::Error) -> EfiError { in from()
/bootable/libbootloader/gbl/libsafemath/src/
Dlib.rs148 pub type Error = &'static Location<'static>; typedef
151 pub struct SafeNum(Result<Primitive, Error>);
200 type Error = Error;
203 fn try_from(val: SafeNum) -> Result<Self, Self::Error> {
/bootable/libbootloader/gbl/libstorage/src/
Dlib.rs125 ArithmeticOverflow(safemath::Error),
140 impl From<safemath::Error> for StorageError {
141 fn from(err: safemath::Error) -> Self { in from()
269 .map_err(|e: safemath::Error| e.into()) in size()
510 (alignment_size + gpt_buffer_size).try_into().map_err(|e: safemath::Error| e.into()) in required_scratch_size()
669 .map_err(|e: safemath::Error| e.into()) in alignment_scratch_size()
Dgpt.rs106 let name = self.name_to_str(&mut name_conversion_buffer).map_err(|_| core::fmt::Error)?; in fmt()
216 .map_err(|e: safemath::Error| e.into()) in required_buffer_size()
/bootable/libbootloader/gbl/third_party/libzbi/src/
Dlib.rs138 let (hdr, payload) = Ref::<B, ZbiHeader>::new_from_prefix(buffer).ok_or(ZbiError::Error)?; in parse()
236 Ref::<B, ZbiHeader>::new_from_prefix(buffer).ok_or(ZbiError::Error)?; in new()
351 Ref::<B, ZbiHeader>::new_from_prefix(buffer).ok_or(ZbiError::Error)?; in parse()
946 type Error = ZbiError; typedef
947 fn try_from(val: u32) -> Result<Self, Self::Error> { in try_from() argument
1135 Error, enumerator
1165 ZbiError::Error => "Generic error", in fmt()
2615 let e = ZbiError::Error; in zbi_test_zbi_error()
/bootable/libbootloader/gbl/libbootconfig/src/
Dlib.rs151 .map_err(|_| core::fmt::Error)?; in write_str()
/bootable/libbootloader/gbl/libfastboot/src/
Dlib.rs69 use core::fmt::{Debug, Display, Error, Formatter, Write};
88 fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { in fmt() argument
187 fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { in fmt() argument