pub struct Type1Entry<ObjectID: FsVerityHashValue> {
pub filename: Box<OsStr>,
pub entry: BootLoaderEntryFile,
pub files: HashMap<Box<str>, RegularFile<ObjectID>>,
}Expand description
Represents a Boot Loader Specification Type 1 entry.
Type 1 entries have separate kernel and initrd files referenced from a .conf file. This structure contains both the parsed configuration and the actual file objects.
Fields§
§filename: Box<OsStr>The basename of the bootloader entry .conf file
entry: BootLoaderEntryFileThe parsed bootloader entry configuration
files: HashMap<Box<str>, RegularFile<ObjectID>>Map of file paths to their corresponding file objects (kernel, initrd, etc.)
Implementations§
Source§impl<ObjectID: FsVerityHashValue> Type1Entry<ObjectID>
impl<ObjectID: FsVerityHashValue> Type1Entry<ObjectID>
Sourcepub fn relocate(&mut self, boot_subdir: Option<&str>, entry_id: &str)
pub fn relocate(&mut self, boot_subdir: Option<&str>, entry_id: &str)
Relocates boot resources to a new entry ID directory.
This moves all referenced files (kernel, initrd, etc.) into a directory named after the entry_id and updates the entry configuration to match. The entry file itself is renamed to “{entry_id}.conf”.
§Arguments
boot_subdir- Optional subdirectory to prepend to paths in the entry fileentry_id- The new entry identifier to use for the directory and filename
Sourcepub fn load(
filename: &OsStr,
file: &RegularFile<ObjectID>,
root: &Directory<ObjectID>,
repo: &Repository<ObjectID>,
) -> Result<Self>
pub fn load( filename: &OsStr, file: &RegularFile<ObjectID>, root: &Directory<ObjectID>, repo: &Repository<ObjectID>, ) -> Result<Self>
Loads a Type 1 boot entry from a BLS .conf file.
Parses the configuration file and loads all referenced boot resources (kernel, initrd, etc.) from the filesystem.
§Arguments
filename- Name of the .conf filefile- The configuration file objectroot- Root directory of the filesystemrepo- The composefs repository
§Returns
A fully loaded Type1Entry with all referenced files