#[repr(C)]pub struct FfsFileHeader {
pub name: [u8; 16],
pub integrity_check: Checksum,
pub type: FvFileType,
pub attributes: FfsFileAttributes,
pub size: [u8; 3],
pub state: FfsFileState,
}Expand description
File Header for files smaller than 16Mb, define in [UEFI-PI Spec] section 2.2.3
All FFS files begin with a header that is aligned on an 8-byteboundry with respect to the beginning of the firmware volume. FFS files can contain the following parts: Header and Data. It is possible to create a file that has only a header and no data, which consumes 24 bytes of space. This type of file is known as a zero-length file. If the file contains data, the data immediately follows the header. The format of the data within a file is defined by the Type field in the header, either EFI_FFS_FILE_HEADER or EFI_FFS_FILE_HEADER2. If the file length is bigger than 16MB, EFI_FFS_FILE_HEADER2 must be used.
Fields§
§name: [u8; 16]§integrity_check: Checksum§type: FvFileType§attributes: FfsFileAttributes§size: [u8; 3]§state: FfsFileStateImplementations§
Source§impl FfsFileHeader
impl FfsFileHeader
pub fn as_bytes(&self) -> &[u8]
pub fn update_checksum(&mut self)
pub fn validate_checksum(&self) -> bool
Trait Implementations§
Source§impl Clone for FfsFileHeader
impl Clone for FfsFileHeader
Source§fn clone(&self) -> FfsFileHeader
fn clone(&self) -> FfsFileHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FfsFileHeader
impl Debug for FfsFileHeader
Source§impl Default for FfsFileHeader
impl Default for FfsFileHeader
Source§fn default() -> FfsFileHeader
fn default() -> FfsFileHeader
Returns the “default value” for a type. Read more
Source§impl<'a> TryFromCtx<'a, Endian> for FfsFileHeaderwhere
FfsFileHeader: 'a,
impl<'a> TryFromCtx<'a, Endian> for FfsFileHeaderwhere
FfsFileHeader: 'a,
Source§impl<'a> TryIntoCtx<Endian> for &'a FfsFileHeader
impl<'a> TryIntoCtx<Endian> for &'a FfsFileHeader
Source§impl TryIntoCtx<Endian> for FfsFileHeader
impl TryIntoCtx<Endian> for FfsFileHeader
impl Copy for FfsFileHeader
Auto Trait Implementations§
impl Freeze for FfsFileHeader
impl RefUnwindSafe for FfsFileHeader
impl Send for FfsFileHeader
impl Sync for FfsFileHeader
impl Unpin for FfsFileHeader
impl UnwindSafe for FfsFileHeader
Blanket Implementations§
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