#bootloader #efi #distinst #mbr

pop-os/distinst-bootloader

Type for checking whether the host environment is in EFI or BIOS mode

1 unstable release

0.1.0 Jun 30, 2020

#642 in Unix APIs

210 stars & 21 watchers

MIT license

2KB

distinst-bootloader

Detect whether a Linux system is in EFI or BIOS mode.

extern crate distinst_bootloader;
use distinst_bootloader::Bootloader;

match Bootloader::detect() {
    Bootloader::Efi => println!("System is in EFI mode"),
    Bootloader::Bios => println!("System is in BIOS mode")
}

lib.rs:

Detect whether a Linux system is in EFI or BIOS mode.

use distinst_bootloader::Bootloader;

match Bootloader::detect() {
    Bootloader::Efi => println!("System is in EFI mode"),
    Bootloader::Bios => println!("System is in BIOS mode")
}

No runtime deps