From 76424950e373d3b04ac3dd13019151bfba3e8423 Mon Sep 17 00:00:00 2001 From: sumuel Date: Mon, 17 Aug 2026 20:44:55 +0000 Subject: Add the files --- src/detection/bios/bios_nbsd.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/detection/bios/bios_nbsd.c (limited to 'src/detection/bios/bios_nbsd.c') diff --git a/src/detection/bios/bios_nbsd.c b/src/detection/bios/bios_nbsd.c new file mode 100644 index 0000000..3ab43ed --- /dev/null +++ b/src/detection/bios/bios_nbsd.c @@ -0,0 +1,20 @@ +#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) { + ffCleanUpSmbiosValue(&bios->date); + } + if (ffSysctlGetString("machdep.dmi.bios-version", &bios->version) == NULL) { + ffCleanUpSmbiosValue(&bios->version); + } + if (ffSysctlGetString("machdep.dmi.bios-vendor", &bios->vendor) == NULL) { + ffCleanUpSmbiosValue(&bios->vendor); + } + if (ffSysctlGetString("machdep.bootmethod", &bios->type) != NULL) { + ffStrbufSetStatic(&bios->type, ffPathExists("/dev/efi", FF_PATHTYPE_FILE) ? "UEFI" : "BIOS"); + } + return NULL; +} -- cgit v1.2.3