Skip to content

Commit e650233

Browse files
committed
partitions: Accept fat or new efi system
1 parent ef89200 commit e650233

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/image_tools/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ pub fn locate_boot_partition(disk: PathBuf) -> Result<partition::Partition,Box<d
2727
let partitions = partition::read_partitions(disk.clone())?;
2828
for (_, partition) in partitions.iter().enumerate() {
2929
let sector_size = 512;
30-
if partition.p_type != 12 {
31-
// Ignore non-fat partitions
32-
continue;
30+
// Ignore non-efi or non-fat partitions
31+
match partition.p_type {
32+
0x0b | 0xef => {},
33+
_ => continue,
3334
}
3435
let disk_handle = File::open(disk.clone())?;
3536
let mut buf_rdr = BufStream::new(disk_handle);

0 commit comments

Comments
 (0)