Skip to content

Commit f31ae32

Browse files
committed
bios: remove checking is_efi_booted() as it would fail on BIOS
only
1 parent 1965a63 commit f31ae32

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bios.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,16 @@ impl Bios {
9797
}
9898

9999
// check bios_boot partition on gpt type disk
100+
#[cfg(target_arch = "x86_64")]
100101
fn get_bios_boot_partition(&self) -> Option<String> {
101102
match blockdev::get_single_device("/") {
102103
Ok(device) => {
103104
let bios_boot_part =
104105
blockdev::get_bios_boot_partition(&device).expect("get bios_boot part");
105106
return bios_boot_part;
106107
}
107-
Err(e) => log::warn!("Get error: {}", e),
108+
Err(e) => log::warn!("Get single device: {}", e),
108109
}
109-
log::debug!("Not found any bios_boot partition");
110110
None
111111
}
112112
}
@@ -149,7 +149,7 @@ impl Component for Bios {
149149

150150
fn query_adopt(&self) -> Result<Option<Adoptable>> {
151151
#[cfg(target_arch = "x86_64")]
152-
if crate::efi::is_efi_booted()? && self.get_bios_boot_partition().is_none() {
152+
if self.get_bios_boot_partition().is_none() {
153153
log::debug!("Skip BIOS adopt");
154154
return Ok(None);
155155
}

0 commit comments

Comments
 (0)