/bootable/libbootloader/gbl/libgbl/src/fastboot/ |
D | vars.rs | 34 ) -> Result<Option<usize>, CommandError>; in get() 40 f: &mut dyn FnMut(&str, &[&str], &str) -> Result<(), CommandError>, in get_all() argument 41 ) -> Result<(), CommandError>; in get_all() 52 ) -> Result<Option<usize>, CommandError> { in get() 59 f: &mut dyn FnMut(&str, &[&str], &str) -> Result<(), CommandError>, in get_all() argument 60 ) -> Result<(), CommandError> { in get_all() 80 ) -> Result<Option<usize>, CommandError> { in get() 92 f: &mut dyn FnMut(&str, &[&str], &str) -> Result<(), CommandError>, in get_all() argument 93 ) -> Result<(), CommandError> { in get_all() 96 let mut res: Result<(), CommandError> = Ok(()); in get_all() [all …]
|
D | sparse.rs | 61 pub fn is_sparse_image(sparse_img: &[u8]) -> Result<SparseHeader, CommandError> { in is_sparse_image() 138 pub fn write_sparse_image<F>(sparse_img: &mut [u8], mut write: F) -> Result<u64, CommandError> in write_sparse_image() 140 F: FnMut(u64, &mut [u8]) -> Result<(), CommandError>, in write_sparse_image() argument 211 fn get(&mut self, val: u32, size: u64) -> Result<&mut [u8], CommandError> { in get() 231 ) -> Result<&mut [u8], CommandError> { in get_mut() 240 ) -> Result<&[u8], CommandError> { in get() 245 fn copy_from<T: AsBytes + FromBytes + Default>(bytes: &[u8]) -> Result<T, CommandError> { in copy_from() 252 fn to_usize<T: TryInto<usize>>(val: T) -> Result<usize, CommandError> { in to_usize() 257 fn usize_add<L: TryInto<usize>, R: TryInto<usize>>(lhs: L, rhs: R) -> Result<usize, CommandError> { in usize_add() 262 fn to_u64<T: TryInto<u64>>(val: T) -> Result<u64, CommandError> { in to_u64() [all …]
|
D | mod.rs | 59 fn check_range(&self, rw_off: u64, rw_size: usize) -> Result<u64, CommandError> { in check_range() 67 pub fn read(&mut self, offset: u64, out: &mut [u8]) -> Result<(), CommandError> { in read() argument 77 pub fn write(&mut self, offset: u64, data: &mut [u8]) -> Result<(), CommandError> { in write() argument 127 ) -> Result<GblFbPartition, CommandError> { in parse_partition() 180 ) -> Result<usize, CommandError> { in get_var() 189 f: &mut dyn FnMut(&str, &[&str], &str) -> Result<(), CommandError>, in get_var_all() argument 191 ) -> Result<(), CommandError> { in get_var_all() 195 fn flash(&mut self, part: &str, utils: &mut FastbootUtils) -> Result<(), CommandError> { in flash() argument 211 ) -> Result<(), CommandError> { in upload() argument 222 ) -> Result<(), CommandError> { in fetch() argument [all …]
|
/bootable/libbootloader/gbl/efi/src/ |
D | utils.rs | 18 use crate::error::{EfiAppError, Result}; 39 pub fn to_usize<T: TryInto<usize>>(val: T) -> Result<usize> { in to_usize() 44 pub fn usize_roundup<L: TryInto<usize>, R: TryInto<usize>>(lhs: L, rhs: R) -> Result<usize> { in usize_roundup() 53 pub fn usize_add<L: TryInto<usize>, R: TryInto<usize>>(lhs: L, rhs: R) -> Result<usize> { in usize_add() 58 pub fn aligned_subslice(bytes: &mut [u8], alignment: usize) -> Result<&mut [u8]> { in aligned_subslice() 79 ) -> core::result::Result<(), BlockIoError> { in read_blocks() argument 89 ) -> core::result::Result<(), BlockIoError> { in write_blocks() argument 106 pub fn new(protocol: Protocol<'a, BlockIoProtocol>) -> Result<Self> { in new() 125 ) -> core::result::Result<(), Option<&'static str>> { in for_each() argument 134 pub fn find_gpt_devices(efi_entry: &EfiEntry) -> Result<EfiMultiBlockDevices> { in find_gpt_devices() [all …]
|
D | fuchsia_boot.rs | 15 use crate::error::{EfiAppError, Result}; 40 pub fn relocate_kernel(kernel: &[u8], dest: &mut [u8]) -> Result<usize> { in relocate_kernel() 67 fn zbi_container_size(zbi: &[u8]) -> Result<usize> { in zbi_container_size() 75 fn zbi_get_unused_buffer(zbi: &mut [u8]) -> Result<(&mut [u8], &mut [u8])> { in zbi_get_unused_buffer() 83 fn relocate_to_tail(kernel: &mut [u8]) -> Result<(&mut [u8], &mut [u8], usize)> { in relocate_to_tail() 93 fn load_fuchsia_simple<'a>(efi_entry: &EfiEntry, load: &'a mut [u8]) -> Result<&'a mut [u8]> { in load_fuchsia_simple() 150 pub fn is_fuchsia_gpt(efi_entry: &EfiEntry) -> Result<()> { in is_fuchsia_gpt() argument 187 pub fn fuchsia_boot_demo(efi_entry: EfiEntry) -> Result<()> { in fuchsia_boot_demo() argument
|
D | net.rs | 16 error::{EfiAppError, Result}, 52 fn reset_simple_network<'a>(snp: &Protocol<'a, SimpleNetworkProtocol>) -> Result<()> { in reset_simple_network() argument 272 fn find_net_device(efi_entry: &EfiEntry) -> Result<DeviceHandle> { in find_net_device() 324 pub fn listen(&mut self, port: u16) -> Result<()> { in listen() argument 354 pub fn receive_exact(&mut self, out: &mut [u8], timeout: u64) -> Result<()> { in receive_exact() argument 356 loop_with_timeout(self.efi_entry, timeout, || -> core::result::Result<Result<()>, bool> { in receive_exact() 378 pub fn send_exact(&mut self, data: &[u8], timeout: u64) -> Result<()> { in send_exact() argument 381 loop_with_timeout(self.efi_entry, timeout, || -> core::result::Result<Result<()>, bool> { in send_exact() 420 pub fn with_efi_network<F, R>(efi_entry: &EfiEntry, mut f: F) -> Result<R> in with_efi_network()
|
D | fastboot.rs | 20 use crate::error::{EfiAppError, GblEfiError, Result as GblResult}; 23 use core::{fmt::Write, result::Result}; 49 fn read_exact(&mut self, out: &mut [u8]) -> Result<(), TransportError> { in read_exact() argument 56 fn write_exact(&mut self, data: &[u8]) -> Result<(), TransportError> { in write_exact() argument 98 fn receive_packet(&mut self, out: &mut [u8]) -> Result<usize, TransportError> { in receive_packet() 111 fn send_packet(&mut self, packet: &[u8]) -> Result<(), TransportError> { in send_packet() argument
|
D | error.rs | 67 pub type Result<T> = core::result::Result<T, GblEfiError>; typedef
|
D | main.rs | 34 use error::Result; 47 fn main(image_handle: *mut core::ffi::c_void, systab_ptr: *mut EfiSystemTable) -> Result<()> { in main() argument
|
/bootable/libbootloader/gbl/libfastboot/src/ |
D | lib.rs | 88 fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { in fmt() argument 102 fn receive_packet(&mut self, out: &mut [u8]) -> Result<usize, TransportError>; in receive_packet() 108 fn send_packet(&mut self, packet: &[u8]) -> Result<(), TransportError>; in send_packet() argument 121 fn read_exact(&mut self, out: &mut [u8]) -> Result<(), TransportError>; in read_exact() argument 124 fn write_exact(&mut self, data: &[u8]) -> Result<(), TransportError>; in write_exact() argument 132 pub fn new_and_handshake(tcp_stream: &'a mut dyn TcpStream) -> Result<Self, TransportError> { in new_and_handshake() 144 fn receive_packet(&mut self, out: &mut [u8]) -> Result<usize, TransportError> { in receive_packet() 159 fn send_packet(&mut self, packet: &[u8]) -> Result<(), TransportError> { in send_packet() argument 187 fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { in fmt() argument 223 ) -> Result<usize, CommandError>; in get_var() [all …]
|
/bootable/libbootloader/gbl/libgbl/src/ |
D | ops.rs | 20 use crate::error::{Error, Result as GblResult}; 25 result::Result, 79 ) -> Result<(), GblOpsError>; in visit_block_devices() argument 82 fn console_put_char(&mut self, ch: u8) -> Result<(), GblOpsError>; in console_put_char() argument 86 fn should_stop_in_fastboot(&mut self) -> Result<bool, GblOpsError>; in should_stop_in_fastboot() 91 fn boot(&mut self, boot_images: BootImages) -> Result<(), GblOpsError>; in boot() argument 170 ) -> core::result::Result<(), Option<&'static str>> { in for_each() argument 186 fn write_str(&mut self, s: &str) -> core::fmt::Result { in write_str() argument 202 ) -> Result<(), GblOpsError> { in visit_block_devices() argument 206 fn console_put_char(&mut self, ch: u8) -> Result<(), GblOpsError> { in console_put_char() argument [all …]
|
D | error.rs | 24 pub type Result<T> = core::result::Result<T, IntegrationError>; typedef 50 fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { in fmt() argument 156 fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { in fmt() argument
|
D | slots.rs | 87 fn try_from(value: usize) -> Result<Self, Self::Error> { in try_from() 265 fn get_slot_by_number(&self, number: usize) -> Result<Slot, Error>; in get_slot_by_number() 356 fn mark_boot_attempt(&mut self) -> Result<BootToken, Error>; in mark_boot_attempt() 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
|
D | lib.rs | 61 pub use error::{Error, IntegrationError, Result}; 221 ) -> Result<VerifiedData<'b>> { in load_and_verify_image() 254 ) -> Result<Cursor<'b, B, M>> { in load_slot_interface() 279 ) -> Result<InfoStruct> { in unpack_boot_image() 301 ) -> Result<KernelImage<'b>> { in kernel_load() 328 ) -> Result<&'static str> { in ramdisk_bootconfig_load() 348 ) -> Result<Dtb> { in dtb_update_and_load() 373 ) -> Result<()> { in kernel_jump() argument 413 ) -> Result<()> { in load_verify_boot() argument 459 ) -> Result<(KernelImage<'e>, BootToken)> { in lvb_inner() [all …]
|
/bootable/libbootloader/gbl/libfdt/src/ |
D | lib.rs | 41 pub type Result<T> = core::result::Result<T, FdtError>; typedef 44 fn map_result(code: core::ffi::c_int) -> Result<core::ffi::c_int> { in map_result() 55 fn fdt_check_header(fdt: &[u8]) -> Result<()> { in fdt_check_header() argument 68 ) -> Result<core::ffi::c_int> { in fdt_add_subnode() 85 ) -> Result<core::ffi::c_int> { in fdt_subnode_offset() 120 pub fn from_bytes_ref(buffer: &[u8]) -> Result<&FdtHeader> { in from_bytes_ref() 128 pub fn from_bytes_mut(buffer: &mut [u8]) -> Result<&mut FdtHeader> { in from_bytes_mut() 140 pub unsafe fn from_raw(ptr: *const u8) -> Result<(&'static FdtHeader, &'static [u8])> { in from_raw() 157 pub fn new(init: T) -> Result<Self> { in new() 162 pub fn header_ref(&self) -> Result<&FdtHeader> { in header_ref() [all …]
|
/bootable/libbootloader/gbl/libstorage/src/ |
D | non_blocking.rs | 16 is_aligned, is_buffer_aligned, BlockInfo, BlockIo, BlockIoError, Result, StorageError, 76 ) -> core::result::Result<(), BlockIoError>; in write_blocks() argument 102 ) -> core::result::Result<(), BlockIoError>; in read_blocks() argument 128 fn abort(&mut self) -> core::result::Result<(), BlockIoError>; in abort() argument 141 ) -> core::result::Result<(), BlockIoError> { in read_blocks() argument 161 ) -> core::result::Result<(), BlockIoError> { in write_blocks() argument 341 pub fn sync(mut self) -> Result<()> { in sync() argument 346 fn do_sync(&mut self) -> Result<()> { in do_sync() argument 404 pub fn abort(&mut self) -> Result<()> { in abort() argument 420 pub fn sync(&mut self) -> Result<()> { in sync() argument [all …]
|
D | lib.rs | 120 pub type Result<T> = core::result::Result<T, StorageError>; typedef 159 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt() argument 178 pub fn total_size(&self) -> Result<u64> { in total_size() 231 ) -> core::result::Result<(), BlockIoError>; in read_blocks() argument 249 ) -> core::result::Result<(), BlockIoError>; in write_blocks() argument 266 pub fn size(&self) -> Result<u64> { in size() 296 |io, _, gpt_buffer, _| -> Result<Option<Partition>> { in next() 346 fn block_size(&mut self) -> Result<u64> { in block_size() 351 fn num_blocks(&mut self) -> Result<u64> { in num_blocks() 356 fn total_size(&mut self) -> Result<u64> { in total_size() [all …]
|
D | multi_blocks.rs | 15 use crate::{AsBlockDevice, BlockIo, Partition, Result, StorageError}; 24 ) -> core::result::Result<(), Option<&'static str>>; in for_each() argument 31 ) -> Result<()> { in for_each_until() argument 40 fn get(&mut self, id: u64) -> Result<SelectedBlockDevice> in get() 63 fn check_part(&mut self, part: &str) -> Result<(u64, Partition)> { in check_part() 78 fn find_partition(&mut self, part: &str) -> Result<Partition> { in find_partition() 86 fn read_gpt_partition(&mut self, part_name: &str, offset: u64, out: &mut [u8]) -> Result<()> { in read_gpt_partition() argument 94 fn write_gpt_partition(&mut self, part_name: &str, offset: u64, data: &mut [u8]) -> Result<()> { in write_gpt_partition() argument 104 ) -> core::result::Result<(), Option<&'static str>> { in for_each() argument 110 fn until_ok<F, R>(devs: &mut (impl AsMultiBlockDevices + ?Sized), mut f: F) -> Result<R> in until_ok() [all …]
|
D | gpt.rs | 15 use crate::{aligned_subslice, read, write_bytes_mut, BlockIo, Result, StorageError}; 72 pub fn blocks(&self) -> Result<u64> { in blocks() 84 pub fn name_to_str<'a>(&self, buffer: &'a mut [u8]) -> Result<&'a str> { in name_to_str() 103 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt() argument 147 fn num_valid_entries(&self) -> Result<u64> { in num_valid_entries() 174 pub(crate) fn new_from_buffer(max_entries: u64, buffer: &'a mut [u8]) -> Result<Gpt<'a>> { in new_from_buffer() 191 pub fn from_existing(buffer: &'a mut [u8]) -> Result<Gpt<'a>> { in from_existing() 211 pub(crate) fn required_buffer_size(max_entries: u64) -> Result<usize> { in required_buffer_size() 222 pub(crate) fn entries(&self) -> Result<&[GptEntry]> { in entries() 233 pub(crate) fn find_partition(&self, part: &str) -> Result<&GptEntry> { in find_partition() [all …]
|
/bootable/libbootloader/gbl/libbootconfig/src/ |
D | lib.rs | 31 pub type Result<T> = core::result::Result<T, BootConfigError>; typedef 50 pub fn new(buffer: &'a mut [u8]) -> Result<Self> { in new() 84 pub fn add_with<F>(&mut self, reader: F) -> Result<()> in add_with() 86 F: FnOnce(&mut [u8]) -> Result<usize>, in add_with() 97 pub fn add(&mut self, config: &str) -> Result<()> { in add() argument 110 fn update_trailer(&mut self) -> Result<()> { in update_trailer() argument 134 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt() argument 144 fn write_str(&mut self, s: &str) -> core::fmt::Result { in write_str() argument
|
/bootable/libbootloader/gbl/libmisc/src/ |
D | lib.rs | 36 pub type Result<T> = core::result::Result<T, BcbError>; typedef 48 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { in fmt() argument 76 pub fn from_bytes_ref(buffer: &[u8]) -> Result<&BootloaderMessage> { in from_bytes_ref() 84 pub fn boot_mode(&self) -> Result<AndroidBootMode> { in boot_mode()
|
/bootable/libbootloader/gbl/libboot/src/ |
D | x86.rs | 79 pub fn from_bytes_ref(buffer: &[u8]) -> Result<&BootParams> { in from_bytes_ref() 87 pub fn from_bytes_mut(buffer: &mut [u8]) -> Result<&mut BootParams> { in from_bytes_mut() 105 pub fn check(&self) -> Result<()> { in check() argument 176 ) -> Result<()> in boot_linux_bzimage() 178 F: FnOnce(&mut [e820entry]) -> Result<u8>, in boot_linux_bzimage()
|
D | lib.rs | 28 pub type Result<T> = core::result::Result<T, BootError>; typedef
|
/bootable/libbootloader/gbl/libgbl/tests/ |
D | integration_tests.rs | 55 ) -> Result<(), GblOpsError> { in visit_block_devices() argument 62 fn console_put_char(&mut self, ch: u8) -> Result<(), GblOpsError> { in console_put_char() argument 66 fn should_stop_in_fastboot(&mut self) -> Result<bool, GblOpsError> { in should_stop_in_fastboot() 70 fn boot(&mut self, boot_images: BootImages) -> Result<(), GblOpsError> { in boot() argument
|
/bootable/libbootloader/gbl/smoltcp/ |
D | heapless.rs | 45 pub fn push(&mut self, item: T) -> Result<(), T> { in push() argument 92 pub fn insert(&mut self, key: K, value: V) -> Result<Option<V>, (K, V)> { in insert()
|