mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
TPM (FreeBSD): add support
This commit is contained in:
@@ -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