Skip to content

Commit

Permalink
moss/boot: Adapt to new blsforme by loading snippets
Browse files Browse the repository at this point in the history
Signed-off-by: Ikey Doherty <ikey@serpentos.com>
  • Loading branch information
ikeycode committed Dec 22, 2024
1 parent 19180d5 commit 739006c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions moss/src/client/boot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<Vec<_>>();
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(()),
};

Expand Down

0 comments on commit 739006c

Please sign in to comment.