From b5da20357168af1f279bfe8333722d0b00dac9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 15 Jun 2023 10:12:05 +0800 Subject: [PATCH] Board (FreeBSD): add support --- CMakeLists.txt | 2 +- src/detection/board/board_bsd.c | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/detection/board/board_bsd.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 9213817a0..37797921b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -429,7 +429,7 @@ elseif(BSD) src/detection/battery/battery_bsd.c src/detection/bios/bios_bsd.c src/detection/bluetooth/bluetooth_linux.c - src/detection/board/board_nosupport.c + src/detection/board/board_bsd.c src/detection/brightness/brightness_nosupport.c src/detection/chassis/chassis_nosupport.c src/detection/cpu/cpu_bsd.c diff --git a/src/detection/board/board_bsd.c b/src/detection/board/board_bsd.c new file mode 100644 index 000000000..a10821ac6 --- /dev/null +++ b/src/detection/board/board_bsd.c @@ -0,0 +1,12 @@ +#include "board.h" +#include "common/settings.h" + +void ffDetectBoard(FFBoardResult* board) +{ + ffStrbufInit(&board->boardName); + ffStrbufInit(&board->boardVendor); + ffStrbufInit(&board->boardVersion); + ffSettingsGetFreeBSDKenv("smbios.planar.product", &board->boardName); + ffSettingsGetFreeBSDKenv("smbios.planar.maker", &board->boardVendor); + ffSettingsGetFreeBSDKenv("smbios.planar.version", &board->boardVersion); +}