diff options
| author | sumuel <samuel@yakubos.org> | 2026-08-17 20:44:55 +0000 |
|---|---|---|
| committer | sumuel <samuel@yakubos.org> | 2026-08-17 20:44:55 +0000 |
| commit | 76424950e373d3b04ac3dd13019151bfba3e8423 (patch) | |
| tree | 4c3cfdbda039e592b9186be3e28f8d7cfd439e8a /src/detection/bios/bios_nbsd.c | |
Add the files
Diffstat (limited to 'src/detection/bios/bios_nbsd.c')
| -rw-r--r-- | src/detection/bios/bios_nbsd.c | 20 |
1 files changed, 20 insertions, 0 deletions
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; +} |