Home
last modified time | relevance | path

Searched refs:max_entries (Results 1 – 2 of 2) sorted by relevance

/bootable/libbootloader/gbl/libstorage/src/
Dgpt.rs137 max_entries: u64, field
174 pub(crate) fn new_from_buffer(max_entries: u64, buffer: &'a mut [u8]) -> Result<Gpt<'a>> { in new_from_buffer()
175 if max_entries > GPT_MAX_NUM_ENTRIES in new_from_buffer()
176 || buffer.len() < Self::required_buffer_size(max_entries)? in new_from_buffer()
182 GptInfo { num_valid_entries: None, max_entries, block_size: 0 }; in new_from_buffer()
194 let entries_size = SafeNum::from(info.max_entries) * GPT_ENTRY_SIZE; in from_existing()
211 pub(crate) fn required_buffer_size(max_entries: u64) -> Result<usize> { in required_buffer_size()
212 let entries_size = SafeNum::from(max_entries) * GPT_ENTRY_SIZE; in required_buffer_size()
277 if self.info.max_entries < header.entries_count.into() in validate_gpt()
346 - (SafeNum::from(self.info.max_entries) * core::mem::size_of::<GptEntry>()); in load_and_sync()
[all …]
Dlib.rs400 with_partitioned_scratch(self, |io, alignment_scratch, gpt_buffer, max_entries| { in sync_gpt()
403 &mut Gpt::new_from_buffer(max_entries, gpt_buffer)?, in sync_gpt()
523 dev.with(&mut |io, scratch, max_entries| { in with_partitioned_scratch()
525 if scratch.len() < required_scratch_size(io, max_entries)? { in with_partitioned_scratch()
529 Ok(f(io, alignment, gpt, max_entries)) in with_partitioned_scratch()