mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-04 19:52:22 +00:00
feat(boot): reconnect only storage for filesystem drivers (#130)
Add a provides field to drivers, either any or filesystems. When every driver only provides filesystems, only disk and partition controllers are reconnected.
This commit is contained in:
3 files changed
+79
-18
No files matched your search
@@ -10,4 +10,21 @@ pub struct DriverDeclaration {
|
||||
/// The filesystem path to the driver.
|
||||
/// This file should be an EFI executable that can be located and executed.
|
||||
pub path: String,
|
||||
/// What the driver provides.
|
||||
/// This decides which controllers are reconnected after the drivers are loaded.
|
||||
#[serde(default)]
|
||||
pub provides: DriverProvides,
|
||||
}
|
||||
|
||||
/// What a driver provides to the firmware.
|
||||
#[derive(Serialize, Deserialize, Debug, Default, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum DriverProvides {
|
||||
/// The driver can provide anything, so every controller is reconnected.
|
||||
#[default]
|
||||
#[serde(rename = "any")]
|
||||
Any,
|
||||
/// The driver only provides filesystem or disk support,
|
||||
/// so only the controllers that are disks or partitions are reconnected.
|
||||
#[serde(rename = "filesystems")]
|
||||
Filesystems,
|
||||
}
|
||||
Reference in new issue
Block a user