mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-04 19:52:22 +00:00
fix(bootloader-interface): don't fail boot when a variable can't be used
Every Boot Loader Interface variable that couldn't be read, written, or removed aborted boot. The interface only exchanges information with the operating system, so log a warning and continue instead. This includes failing to remove LoaderEntryOneShot or LoaderConfigTimeoutOneShot, which made every following boot fail the same way, as the variable was never removed.
This commit is contained in:
1 parent
8fce1738f2
commit
9fa57ee197
4 files changed
+82
-35
No files matched your search
@@ -11,6 +11,7 @@ use eficore::loader::source::ImageSource;
|
||||
use eficore::loader::{ImageLoadRequest, ImageLoader};
|
||||
use eficore::media_loader::MediaLoaderHandle;
|
||||
use eficore::media_loader::constants::linux::LINUX_EFI_INITRD_MEDIA_GUID;
|
||||
use log::warn;
|
||||
use uefi::CString16;
|
||||
use uefi::proto::loaded_image::LoadedImage;
|
||||
|
||||
@@ -126,8 +127,13 @@ pub fn chainload(context: Rc<SproutContext>, configuration: &ChainloadConfigurat
|
||||
}
|
||||
|
||||
// Mark execution of an entry in the bootloader interface.
|
||||
BootloaderInterface::mark_exec(context.root().timer())
|
||||
.context("unable to mark execution of boot entry in bootloader interface")?;
|
||||
// This is only informational, so it should not prevent booting.
|
||||
if let Err(error) = BootloaderInterface::mark_exec(context.root().timer()) {
|
||||
warn!(
|
||||
"unable to mark execution of boot entry in bootloader interface: {:#}",
|
||||
error
|
||||
);
|
||||
}
|
||||
|
||||
// Since we are about to hand off control to another image, we need to execute the handoff hook.
|
||||
// This will perform operations like clearing the screen.
|
||||
|
||||
Reference in new issue
Block a user