pub struct BootLoaderEntryFile {
pub lines: Vec<String>,
}Expand description
Represents a parsed Boot Loader Specification entry file.
Contains the lines of a BLS .conf file and provides methods to query and modify entries like kernel paths, initrd files, and command-line options.
Fields§
§lines: Vec<String>Lines from the bootloader entry configuration file
Implementations§
Source§impl BootLoaderEntryFile
impl BootLoaderEntryFile
Sourcepub fn get_values<'a>(
&'a self,
key: &'a str,
) -> impl Iterator<Item = &'a str> + 'a
pub fn get_values<'a>( &'a self, key: &'a str, ) -> impl Iterator<Item = &'a str> + 'a
Sourcepub fn add_cmdline(&mut self, arg: &str)
pub fn add_cmdline(&mut self, arg: &str)
Adds a kernel command-line argument, possibly replacing a previous value.
arg can be something like “composefs=xyz” but it can also be something like “rw”. In either case, if the argument already existed, it will be replaced.
Sourcepub fn adjust_cmdline(&mut self, karg: Option<&str>, extra: &[&str])
pub fn adjust_cmdline(&mut self, karg: Option<&str>, extra: &[&str])
Adjusts the kernel command-line arguments by adding a composefs karg (if provided) and adding additional arguments.
karg should be a complete kernel argument string such as
"composefs.digest=v1-sha256-12:abc123" or "composefs=abc123" as produced by
[composefs_boot::cmdline::ComposefsCmdline::to_cmdline_arg].