fix(autoconfigure): reinject values after configuration changes

This commit is contained in:
2025-10-27 22:43:37 -04:00
parent e8b7b967fa
commit ebd3c07bf5
2 changed files with 5 additions and 3 deletions

View File

@@ -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");
}

View File

@@ -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));
}