diff --git a/src/bios.rs b/src/bios.rs index 11609d28..82abb789 100644 --- a/src/bios.rs +++ b/src/bios.rs @@ -16,7 +16,7 @@ pub(crate) const GRUB_BIN: &str = "usr/sbin/grub2-install"; #[derive(Serialize, Deserialize, Debug)] struct BlockDevice { path: String, - pttype: String, + pttype: Option, parttypename: Option, } @@ -118,7 +118,7 @@ impl Bios { // Find the device with the parttypename "BIOS boot" for device in devices.blockdevices { if let Some(parttypename) = &device.parttypename { - if parttypename == "BIOS boot" && device.pttype == "gpt" { + if parttypename == "BIOS boot" && device.pttype == Some("gpt") { return Ok(Some(device.path)); } }