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

Method find_partition_of_esp

crates/blockdev/src/blockdev.rs:291–294  ·  view source on GitHub ↗

Find the EFI System Partition (ESP) among children, or error if absent. This is a convenience wrapper around [`Self::find_partition_of_esp_optional`] for callers that require an ESP to be present.

(&self)

Source from the content-addressed store, hash-verified

289 /// This is a convenience wrapper around [`Self::find_partition_of_esp_optional`]
290 /// for callers that require an ESP to be present.
291 pub fn find_partition_of_esp(&self) -> Result<&Device> {
292 self.find_partition_of_esp_optional()?
293 .ok_or_else(|| anyhow!("ESP partition not found on {}", self.path()))
294 }
295
296 /// Find a child partition by partition number (1-indexed).
297 pub fn find_device_by_partno(&self, partno: u32) -> Result<&Device> {

Callers 5

test_parse_lsblkFunction · 0.80
test_parse_lsblk_mbrFunction · 0.80
test_parse_lsblk_vrocFunction · 0.80
test_parse_lsblk_swraidFunction · 0.80

Calls 1

Tested by 4

test_parse_lsblkFunction · 0.64
test_parse_lsblk_mbrFunction · 0.64
test_parse_lsblk_vrocFunction · 0.64
test_parse_lsblk_swraidFunction · 0.64