diff --git a/src/detection/bios/bios_nbsd.c b/src/detection/bios/bios_nbsd.c index 73b56ceed..3ab43ed0b 100644 --- a/src/detection/bios/bios_nbsd.c +++ b/src/detection/bios/bios_nbsd.c @@ -1,6 +1,7 @@ #include "bios.h" #include "common/sysctl.h" #include "common/smbios.h" +#include "common/io.h" const char* ffDetectBios(FFBiosResult* bios) { if (ffSysctlGetString("machdep.dmi.bios-date", &bios->date) == NULL) { @@ -12,6 +13,8 @@ const char* ffDetectBios(FFBiosResult* bios) { if (ffSysctlGetString("machdep.dmi.bios-vendor", &bios->vendor) == NULL) { ffCleanUpSmbiosValue(&bios->vendor); } - ffSysctlGetString("machdep.bootmethod", &bios->type); + if (ffSysctlGetString("machdep.bootmethod", &bios->type) != NULL) { + ffStrbufSetStatic(&bios->type, ffPathExists("/dev/efi", FF_PATHTYPE_FILE) ? "UEFI" : "BIOS"); + } return NULL; }