Global: remove unexpected trailing line endings

Ref: https://github.com/fastfetch-cli/fastfetch/pull/671#issuecomment-1867777472
This commit is contained in:
Carter Li
2023-12-23 00:06:37 +08:00
committed by 李通洲
parent e85a4b9ff5
commit cf98e6f5a1
12 changed files with 85 additions and 79 deletions
+22
View File
@@ -1,4 +1,5 @@
#include "smbiosHelper.h"
#include "common/io/io.h"
bool ffIsSmbiosValueSet(FFstrbuf* value)
{
@@ -26,3 +27,24 @@ bool ffIsSmbiosValueSet(FFstrbuf* value)
!ffStrbufIgnCaseEqualS(value, "N/A")
;
}
#ifdef __linux__
void ffGetSmbiosValue(const char* devicesPath, const char* classPath, FFstrbuf* buffer)
{
if (ffReadFileBuffer(devicesPath, buffer))
{
ffStrbufTrimRightSpace(buffer);
if(ffIsSmbiosValueSet(buffer))
return;
}
if (ffReadFileBuffer(classPath, buffer))
{
ffStrbufTrimRightSpace(buffer);
if(ffIsSmbiosValueSet(buffer))
return;
}
ffStrbufClear(buffer);
}
#endif