Skip to content

Commit e829589

Browse files
Merge pull request #363 from LinusDierheimer/dev
Bump CMakeList version
2 parents e6db860 + 98acd51 commit e829589

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Notable Changes:
88

99
Features:
1010
* Windows (7 and newer) is officially and fully supported
11-
* FreeBSD support is improved greatly (Cpu Temp, Cpu Usage, Disk, Host, Processes, Swap, Terminal / Shell, Uptime)
11+
* FreeBSD support is improved greatly (Bios, Cpu Temp, Cpu Usage, Disk, Host, Processes, Swap, Terminal / Shell, Uptime)
1212
* Adds a new flag `--stat`, which prints time usage for individual modules
1313
* Adds Wifi module which supports Windows and macOS
1414
* Adds data source option for logo printing

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
22

33
project(fastfetch
4-
VERSION 1.7.5
4+
VERSION 1.8.0
55
LANGUAGES C
66
DESCRIPTION "Fast system information tool"
77
HOMEPAGE_URL "https://github.com/LinusDierheimer/fastfetch"
@@ -380,7 +380,7 @@ elseif(BSD)
380380
src/common/processing_linux.c
381381
src/common/sysctl.c
382382
src/detection/battery/battery_nosupport.c
383-
src/detection/bios/bios_nosupport.c
383+
src/detection/bios/bios_bsd.c
384384
src/detection/board/board_nosupport.c
385385
src/detection/chassis/chassis_nosupport.c
386386
src/detection/cpu/cpu_bsd.c

src/detection/bios/bios_bsd.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include "bios.h"
2+
3+
#include <kenv.h>
4+
5+
static void kenvLookup(const char* name, FFstrbuf* result)
6+
{
7+
ffStrbufEnsureFree(result, 255);
8+
int len = kenv(KENV_GET, name, result->chars, 256);
9+
if(len > 0)
10+
result->length = (uint32_t) len;
11+
}
12+
13+
void ffDetectBios(FFBiosResult* bios)
14+
{
15+
ffStrbufInit(&bios->error);
16+
ffStrbufInit(&bios->biosDate);
17+
ffStrbufInit(&bios->biosRelease);
18+
ffStrbufInit(&bios->biosVendor);
19+
ffStrbufInit(&bios->biosVersion);
20+
21+
//https://wiki.ghostbsd.org/index.php/Kenv
22+
kenvLookup("smbios.bios.reldate", &bios->biosDate);
23+
kenvLookup("smbios.system.product", &bios->biosRelease);
24+
kenvLookup("smbios.bios.vendor", &bios->biosVendor);
25+
kenvLookup("smbios.bios.version", &bios->biosVersion);
26+
}

0 commit comments

Comments
 (0)