MCPcopy Create free account
hub / github.com/bootc-dev/bootc / find_colocated_esps

Method find_colocated_esps

crates/blockdev/src/blockdev.rs:196–204  ·  view source on GitHub ↗

Find all ESP partitions across all root devices backing this device. Calls find_all_roots() to discover physical disks, then searches each for an ESP. Returns None if no ESPs are found.

(&self)

Source from the content-addressed store, hash-verified

194 /// Calls find_all_roots() to discover physical disks, then searches each for an ESP.
195 /// Returns None if no ESPs are found.
196 pub fn find_colocated_esps(&self) -> Result<Option<Vec<Device>>> {
197 let mut esps = Vec::new();
198 for root in &self.find_all_roots()? {
199 if let Some(esp) = root.find_partition_of_esp_optional()? {
200 esps.push(esp.clone());
201 }
202 }
203 Ok((!esps.is_empty()).then_some(esps))
204 }
205
206 /// Find a single ESP partition among all root devices backing this device.
207 ///

Callers 1

Calls 3

find_all_rootsMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected