diff --git a/CMakeLists.txt b/CMakeLists.txt index 37797921b..d0168ed4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/src/detection/chassis/chassis_bsd.c b/src/detection/chassis/chassis_bsd.c new file mode 100644 index 000000000..e6475c2eb --- /dev/null +++ b/src/detection/chassis/chassis_bsd.c @@ -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); +}