From 2ba0735064e27e673d6e6d37d61b13c981e385b3 Mon Sep 17 00:00:00 2001 From: Ikey Doherty Date: Fri, 27 Dec 2024 09:55:13 +0000 Subject: [PATCH] blsforme: Make some APIs public for moss Signed-off-by: Ikey Doherty --- blsforme/src/bootenv.rs | 4 ++-- blsforme/src/manager.rs | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/blsforme/src/bootenv.rs b/blsforme/src/bootenv.rs index c991a4e..38a9f84 100644 --- a/blsforme/src/bootenv.rs +++ b/blsforme/src/bootenv.rs @@ -35,10 +35,10 @@ pub enum Firmware { #[derive(Debug)] pub struct BootEnvironment { /// xbootldr device - xbootldr: Option, + pub xbootldr: Option, /// The EFI System Partition (stored as a device path) - esp: Option, + pub esp: Option, /// Firmware in use pub(crate) firmware: Firmware, diff --git a/blsforme/src/manager.rs b/blsforme/src/manager.rs index 7e3c730..4ccd3c8 100644 --- a/blsforme/src/manager.rs +++ b/blsforme/src/manager.rs @@ -175,6 +175,11 @@ impl<'a> Manager<'a> { Ok(mounted_paths) } + /// Returns the boot environment + pub fn boot_environment(&self) -> &BootEnvironment { + &self.boot_env + } + /// Discover installed kernels using the mount tokens pub fn installed_kernels(&self, schema: &Schema, _tokens: &[ScopedMount]) -> Result, Error> { let bootloader = self.bootloader(schema)?;