fix(boot): discover host controllers for --usb-storage and --guest-network runs

This commit is contained in:
Tyler Smith committed 2026-10-19 22:08:01 +00:00
1 parent 23bc242532
commit 8092600aef
1 file changed
+3 -2
+3 -2
View File
@@ -204,7 +204,7 @@ fn option<'a>(options: &'a str, name: &str) -> Option<&'a str> {
/// volume is closed first. With `--preboot SERIAL:GUID` nothing is read: the
/// engine builds the bundle from that disk with the host storage drivers,
/// whose ranges are found here, as they are for every other option that
/// opens a host controller: disks, the NOR store, input and the network.
/// opens a host controller: disks, the NOR store, input and the networks.
fn inputs(options: &[u8], mut volume: FileSystem) -> Result<Inputs, &'static str> {
let text = core::str::from_utf8(options).map_err(|_| "stela.cfg is not UTF-8")?;
let host_devices = [
@@ -213,12 +213,13 @@ fn inputs(options: &[u8], mut volume: FileSystem) -> Result<Inputs, &'static str
"--restore-source",
"--nor",
"--network-check",
"--usb-storage",
]
.iter()
.any(|key| option(text, key).is_some())
|| text
.split_ascii_whitespace()
.any(|word| word == "--input" || word == "--tss");
.any(|word| matches!(word, "--input" | "--tss" | "--guest-network"));
let storage = if host_devices {
Some(storage::discover()?)
} else {