Home
last modified time | relevance | path

Searched refs:to_usize (Results 1 – 4 of 4) sorted by relevance

/bootable/libbootloader/gbl/libgbl/src/fastboot/
Dsparse.rs154 CHUNK_TYPE_RAW => write(write_offset, get_mut(payload, 0, to_usize(payload_sz)?)?)?, in write_sparse_image()
187 write(write_offset, &mut buffer[..to_usize(to_write).unwrap()])?; in write_sparse_image()
232 bytes.get_mut(to_usize(start)?..to_usize(end)?).ok_or(ERR_IMAGE_SIZE.into()) in get_mut()
241 bytes.get(to_usize(start)?..to_usize(end)?).ok_or(ERR_IMAGE_SIZE.into()) in get()
252 fn to_usize<T: TryInto<usize>>(val: T) -> Result<usize, CommandError> { in to_usize() function
258 Ok(to_usize(lhs)?.checked_add(to_usize(rhs)?).ok_or(ERR_ARITHMETIC_OVERFLOW)?) in usize_add()
Dmod.rs232 self.partition_io(part).read(curr, &mut buffer[..to_usize(to_send)?])?; in fetch()
233 uploader.upload(&mut buffer[..to_usize(to_send)?])?; in fetch()
251 fn to_usize(val: u64) -> Result<usize, CommandError> { in to_usize() function
/bootable/libbootloader/gbl/efi/src/
Dutils.rs39 pub fn to_usize<T: TryInto<usize>>(val: T) -> Result<usize> { in to_usize() function
46 let lhs = to_usize(lhs)?; in usize_roundup()
47 let rhs = to_usize(rhs)?; in usize_roundup()
54 Ok(to_usize(lhs)?.checked_add(to_usize(rhs)?).ok_or_else(|| EfiAppError::ArithmeticOverflow)?) in usize_add()
Dfuchsia_boot.rs16 use crate::utils::{aligned_subslice, find_gpt_devices, get_efi_fdt, to_usize, usize_add};
63 Ok(to_usize(dest_kernel_header.entry)?) in relocate_kernel()