mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
Smbios: don't try to scan memory multiple times
This commit is contained in:
parent
34419d9bcf
commit
519dae9462
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user