Ignore:
Timestamp:
Apr 27, 2015, 4:25:30 PM (9 years ago)
Author:
Bruno Cornec
Message:
  • Create a new mr_boot_type function and boot_type mondo struct entry to manage BIOS/EFI/UEFI types
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/common/libmondo-devices.c

    r3374 r3375  
    21042104
    21052105
     2106/**
     2107 * Return the type of boot of the system (UEFI, EFI or BIOS)
     2108 */
     2109t_boot mr_boot_type() {
     2110
     2111    t_boot ret = BIOS;
     2112    FILE *fd = NULL;
     2113
     2114#ifdef __IA64__
     2115    ret = EFI;
     2116#endif
     2117    /* Try to detect whether we are in fact in UEFI mode */
     2118    /* TODO: find the right trigger */
     2119    fd = fopen("/sys/module/efi", "r");
     2120    if (fd != NULL) {
     2121        ret = UEFI;
     2122    }
     2123    return(ret);
     2124}
    21062125
    21072126
     
    26422661        }
    26432662        bkpinfo->boot_loader = i;
     2663        bkpinfo->boot_type = mr_boot_type();
     2664        /* TODO: Chcek consisytency of boot type and boot loader */
    26442665
    26452666        if (bkpinfo->include_paths) {
Note: See TracChangeset for help on using the changeset viewer.