mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
TPM (FreeBSD): add support
This commit is contained in:
+1
-1
@@ -641,7 +641,7 @@ elseif(FreeBSD)
|
||||
src/detection/terminalshell/terminalshell_linux.c
|
||||
src/detection/terminalsize/terminalsize_linux.c
|
||||
src/detection/theme/theme_linux.c
|
||||
src/detection/tpm/tpm_nosupport.c
|
||||
src/detection/tpm/tpm_bsd.c
|
||||
src/detection/uptime/uptime_bsd.c
|
||||
src/detection/users/users_linux.c
|
||||
src/detection/wallpaper/wallpaper_linux.c
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#include "tpm.h"
|
||||
#include "common/sysctl.h"
|
||||
|
||||
const char* ffDetectTPM(FFTPMResult* result)
|
||||
{
|
||||
if (ffSysctlGetString("dev.tpmcrb.0.%desc", &result->description) != NULL)
|
||||
return "TPM device is not found or TPM kernel module is not loaded";
|
||||
|
||||
if (ffStrbufContainS(&result->description, "2.0"))
|
||||
ffStrbufSetStatic(&result->version, "2.0");
|
||||
else if (ffStrbufContainS(&result->description, "1.2"))
|
||||
ffStrbufSetStatic(&result->version, "1.2");
|
||||
else
|
||||
ffStrbufSetStatic(&result->version, "unknown");
|
||||
|
||||
return "Not supported on this platform";
|
||||
}
|
||||
Reference in New Issue
Block a user