Skip to content

Commit 739006c

Browse files
committed
moss/boot: Adapt to new blsforme by loading snippets
Signed-off-by: Ikey Doherty <ikey@serpentos.com>
1 parent 19180d5 commit 739006c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

moss/src/client/boot.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,16 @@ pub fn synchronize(install: &Installation, layouts: &[(Id, Layout)]) -> Result<(
140140
let discovered = schema.discover_system_kernels(kernels.iter())?;
141141

142142
// pipe all of our entries into blsforme
143-
let entries = discovered.iter().map(blsforme::Entry::new);
143+
let mut entries = discovered.iter().map(blsforme::Entry::new).collect::<Vec<_>>();
144+
for entry in entries.iter_mut() {
145+
if let Err(e) = entry.load_cmdline_snippets(&config) {
146+
log::warn!("Failed to load cmdline snippets: {}", e);
147+
}
148+
}
144149

145150
// If we can't get a manager, find, but don't bomb. Its probably a topology failure.
146151
let manager = match blsforme::Manager::new(&config) {
147-
Ok(m) => m.with_entries(entries).with_bootloader_assets(booty_bits),
152+
Ok(m) => m.with_entries(entries.into_iter()).with_bootloader_assets(booty_bits),
148153
Err(_) => return Ok(()),
149154
};
150155

0 commit comments

Comments
 (0)