mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:14:37 +02:00
Smbios: don't try to scan memory multiple times
This commit is contained in:
@@ -138,6 +138,7 @@ const FFSmbiosHeaderTable* ffGetSmbiosHeaderTable()
|
||||
|
||||
if (buffer.chars == NULL)
|
||||
{
|
||||
ffStrbufInit(&buffer);
|
||||
#ifndef __HAIKU__
|
||||
#ifdef __linux__
|
||||
if (!ffAppendFileBuffer("/sys/firmware/dmi/tables/DMI", &buffer))
|
||||
@@ -289,6 +290,9 @@ const FFSmbiosHeaderTable* ffGetSmbiosHeaderTable()
|
||||
}
|
||||
}
|
||||
|
||||
if (buffer.length == 0)
|
||||
return NULL;
|
||||
|
||||
return &table;
|
||||
}
|
||||
#elif defined(_WIN32)
|
||||
|
||||
Reference in New Issue
Block a user