#[repr(C)]pub struct BootValidationEntry {
pub header_id: u8,
pub platform_id: u8,
pub reserved: [u8; 2],
pub manufacturer: [u8; 24],
pub checksum: U16<LittleEndian>,
pub key: [u8; 2],
}Available on crate feature
sync only.Expand description
El Torito boot catalog validation entry.
@hadris-spec El-Torito:validation @hadris-compliance partial @hadris-note The catalog entry is modeled and interoperability-tested, but the audit has not established clause-complete validation. @hadris-tests iso::boot::test_eltorito_boot_catalog_comparison @hadris-fuzz iso_read
Fields§
§header_id: u8The header_id field.
platform_id: u8The platform_id field.
reserved: [u8; 2]The reserved field.
manufacturer: [u8; 24]The manufacturer field.
checksum: U16<LittleEndian>The checksum field.
key: [u8; 2]0x55AA
Implementations§
Source§impl BootValidationEntry
impl BootValidationEntry
Sourcepub fn validate(&self) -> Result<(), BootError>
pub fn validate(&self) -> Result<(), BootError>
Validate the entry and return a detailed error if invalid
Sourcepub fn calculate_checksum(&self) -> u16
pub fn calculate_checksum(&self) -> u16
Calculates the checksum of the boot catalogue
The checksum works such that the checksum of the data (including checksum bytes) is 0. We can do this by finding the sum of the data without the checksum bytes, and negating it (using two’s complement).
Trait Implementations§
Source§impl Clone for BootValidationEntry
impl Clone for BootValidationEntry
impl Copy for BootValidationEntry
Source§impl Debug for BootValidationEntry
impl Debug for BootValidationEntry
Source§impl Default for BootValidationEntry
impl Default for BootValidationEntry
impl Pod for BootValidationEntry
Auto Trait Implementations§
impl Freeze for BootValidationEntry
impl RefUnwindSafe for BootValidationEntry
impl Send for BootValidationEntry
impl Sync for BootValidationEntry
impl Unpin for BootValidationEntry
impl UnsafeUnpin for BootValidationEntry
impl UnwindSafe for BootValidationEntry
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.