Smbios: don't try to scan memory multiple times

This commit is contained in:
李通洲 2025-02-15 19:50:34 +08:00
parent 34419d9bcf
commit 519dae9462

View File

@ -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)