Chassis (FreeBSD): add support

This commit is contained in:
李通洲
2023-06-15 10:15:31 +08:00
parent b5da203571
commit 10a39b88d7
2 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -431,7 +431,7 @@ elseif(BSD)
src/detection/bluetooth/bluetooth_linux.c
src/detection/board/board_bsd.c
src/detection/brightness/brightness_nosupport.c
src/detection/chassis/chassis_nosupport.c
src/detection/chassis/chassis_bsd.c
src/detection/cpu/cpu_bsd.c
src/detection/cpuusage/cpuusage_bsd.c
src/detection/cursor/cursor_linux.c
+13
View File
@@ -0,0 +1,13 @@
#include "chassis.h"
#include "common/settings.h"
void ffDetectChassis(FFChassisResult* result)
{
ffStrbufInit(&result->error);
ffStrbufInit(&result->chassisType);
ffStrbufInit(&result->chassisVendor);
ffStrbufInit(&result->chassisVersion);
ffSettingsGetFreeBSDKenv("smbios.chassis.type", &result->chassisType);
ffSettingsGetFreeBSDKenv("smbios.chassis.maker", &result->chassisVendor);
ffSettingsGetFreeBSDKenv("smbios.chassis.version", &result->chassisVersion);
}