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

Method find_colocated_bios_boot

crates/blockdev/src/blockdev.rs:220–228  ·  view source on GitHub ↗

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

(&self)

Source from the content-addressed store, hash-verified

218 /// Calls find_all_roots() to discover physical disks, then searches each for a BIOS boot partition.
219 /// Returns None if no BIOS boot partitions are found.
220 pub fn find_colocated_bios_boot(&self) -> Result<Option<Vec<Device>>> {
221 let bios_boots: Vec<_> = self
222 .find_all_roots()?
223 .iter()
224 .filter_map(|root| root.find_partition_of_bios_boot())
225 .cloned()
226 .collect();
227 Ok((!bios_boots.is_empty()).then_some(bios_boots))
228 }
229
230 /// Find a child partition by partition type (case-insensitive).
231 pub fn find_partition_of_type(&self, parttype: &str) -> Option<&Device> {

Callers

nothing calls this directly

Calls 4

find_all_rootsMethod · 0.80
iterMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected