mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-08 14:10:11 +01:00
IO (Linux): improve performance of ffPathExists
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
const char* ffDetectTPM(FFTPMResult* result)
|
||||
{
|
||||
if (!ffPathExists("/sys/class/tpm/tpm0", FF_PATHTYPE_DIRECTORY))
|
||||
if (!ffPathExists("/sys/class/tpm/tpm0/", FF_PATHTYPE_DIRECTORY))
|
||||
{
|
||||
if (!ffPathExists("/sys/class/tpm", FF_PATHTYPE_DIRECTORY))
|
||||
if (!ffPathExists("/sys/class/tpm/", FF_PATHTYPE_DIRECTORY))
|
||||
return "TPM is not supported by kernel";
|
||||
return "TPM device is not found";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user