fix(boot): discover host controllers for --usb-storage and --guest-network runs
This commit is contained in:
1 parent
23bc242532
commit
8092600aef
1 file changed
+3
-2
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user