Smbios: don't try to scan memory multiple times
This commit is contained in:
1 parent
34419d9bcf
commit
519dae9462
1 file changed
+4
@@ -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