From 739006c532b857fb88028c413f02324afe74ad5d Mon Sep 17 00:00:00 2001 From: Ikey Doherty Date: Sun, 22 Dec 2024 13:54:53 +0000 Subject: [PATCH] moss/boot: Adapt to new blsforme by loading snippets Signed-off-by: Ikey Doherty --- moss/src/client/boot.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/moss/src/client/boot.rs b/moss/src/client/boot.rs index 222e713d..8c9b34cc 100644 --- a/moss/src/client/boot.rs +++ b/moss/src/client/boot.rs @@ -140,11 +140,16 @@ pub fn synchronize(install: &Installation, layouts: &[(Id, Layout)]) -> Result<( let discovered = schema.discover_system_kernels(kernels.iter())?; // pipe all of our entries into blsforme - let entries = discovered.iter().map(blsforme::Entry::new); + let mut entries = discovered.iter().map(blsforme::Entry::new).collect::>(); + for entry in entries.iter_mut() { + if let Err(e) = entry.load_cmdline_snippets(&config) { + log::warn!("Failed to load cmdline snippets: {}", e); + } + } // If we can't get a manager, find, but don't bomb. Its probably a topology failure. let manager = match blsforme::Manager::new(&config) { - Ok(m) => m.with_entries(entries).with_bootloader_assets(booty_bits), + Ok(m) => m.with_entries(entries.into_iter()).with_bootloader_assets(booty_bits), Err(_) => return Ok(()), };