IO (Linux): improve performance of ffPathExists

This commit is contained in:
李通洲
2024-10-15 19:40:03 +08:00
parent 2b2c223d22
commit ae76d2d032
5 changed files with 21 additions and 15 deletions
+2 -2
View File
@@ -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";
}