Type2Entry

Struct Type2Entry 

Source
pub struct Type2Entry<ObjectID: FsVerityHashValue> {
    pub kver: Option<Box<OsStr>>,
    pub file_path: PathBuf,
    pub file: RegularFile<ObjectID>,
    pub pe_type: PEType,
}
Expand description

Represents a Boot Loader Specification Type 2 entry (Unified Kernel Image).

Type 2 entries are UKI files that bundle the kernel, initrd, and other components into a single EFI executable.

Fields§

§kver: Option<Box<OsStr>>

Kernel version string, if found in /usr/lib/modules

§file_path: PathBuf

Path to the file (relative to /boot/EFI/Linux)

§file: RegularFile<ObjectID>

The Portable Executable binary

§pe_type: PEType

Type of PE file (UKI or UKI addon)

Implementations§

Source§

impl<ObjectID: FsVerityHashValue> Type2Entry<ObjectID>

Source

pub fn rename(&mut self, name: &str)

Renames the UKI file to a new name.

§Arguments
  • name - New base name (without .efi extension)
Source

fn find_uki_components( dir: &Directory<ObjectID>, entries: &mut Vec<Self>, path: &mut PathBuf, kver: &Option<Box<OsStr>>, ) -> Result<()>

Source

pub fn load_all(root: &Directory<ObjectID>) -> Result<Vec<Self>>

Loads all Type 2 boot entries from /boot/EFI/Linux and /usr/lib/modules.

§Arguments
  • root - Root directory of the filesystem
§Returns

A vector of all Type2Entry objects found

Trait Implementations§

Source§

impl<ObjectID: Debug + FsVerityHashValue> Debug for Type2Entry<ObjectID>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<ObjectID> Freeze for Type2Entry<ObjectID>
where ObjectID: Freeze,

§

impl<ObjectID> RefUnwindSafe for Type2Entry<ObjectID>
where ObjectID: RefUnwindSafe,

§

impl<ObjectID> Send for Type2Entry<ObjectID>

§

impl<ObjectID> Sync for Type2Entry<ObjectID>

§

impl<ObjectID> Unpin for Type2Entry<ObjectID>

§

impl<ObjectID> UnwindSafe for Type2Entry<ObjectID>
where ObjectID: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V