mirror of
https://github.com/edera-dev/sprout.git
synced 2025-12-19 10:30:17 +00:00
fix(autoconfigure): reinject values after configuration changes
This commit is contained in:
@@ -3,7 +3,7 @@ use crate::utils;
|
||||
use crate::utils::media_loader::MediaLoaderHandle;
|
||||
use crate::utils::media_loader::constants::linux::LINUX_EFI_INITRD_MEDIA_GUID;
|
||||
use anyhow::{Context, Result, bail};
|
||||
use log::{error, info};
|
||||
use log::error;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::rc::Rc;
|
||||
use uefi::CString16;
|
||||
@@ -69,8 +69,6 @@ pub fn chainload(context: Rc<SproutContext>, configuration: &ChainloadConfigurat
|
||||
.context("unable to convert chainloader options to CString16")?,
|
||||
);
|
||||
|
||||
info!("options: {}", options);
|
||||
|
||||
if options.num_bytes() > u32::MAX as usize {
|
||||
bail!("chainloader options too large");
|
||||
}
|
||||
|
||||
@@ -118,6 +118,9 @@ fn run() -> Result<()> {
|
||||
|
||||
// Extend the root context with the autoconfigured actions.
|
||||
root.actions_mut().extend(config.actions);
|
||||
|
||||
// Insert any modified root values.
|
||||
context.insert(&config.values);
|
||||
}
|
||||
|
||||
// Refreeze the context to ensure that further operations can share the context.
|
||||
@@ -248,6 +251,7 @@ fn main() -> Result<()> {
|
||||
for (index, stack) in error.chain().enumerate() {
|
||||
error!("[{}]: {}", index, stack);
|
||||
}
|
||||
// Sleep for 10 seconds to allow the user to read the error.
|
||||
uefi::boot::stall(Duration::from_secs(10));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user