Host (Windows): cleanup useless smbios values

This commit is contained in:
李通洲
2023-07-04 17:53:28 +08:00
parent 107b3dc1e3
commit c6416b5ccb
3 changed files with 14 additions and 0 deletions
+6
View File
@@ -1,5 +1,6 @@
#include "host.h"
#include "util/windows/registry.h"
#include "util/smbiosHelper.h"
const char* ffDetectHost(FFHostResult* host)
{
@@ -9,10 +10,15 @@ const char* ffDetectHost(FFHostResult* host)
return "ffRegOpenKeyForRead(HKEY_LOCAL_MACHINE, L\"HARDWARE\\DESCRIPTION\\System\\BIOS\", &hKey, NULL) failed";
ffRegReadStrbuf(hKey, L"SystemProductName", &host->productName, NULL);
ffCleanUpSmbiosValue(&host->productName);
ffRegReadStrbuf(hKey, L"SystemFamily", &host->productFamily, NULL);
ffCleanUpSmbiosValue(&host->productFamily);
ffRegReadStrbuf(hKey, L"SystemVersion", &host->productVersion, NULL);
ffCleanUpSmbiosValue(&host->productVersion);
ffRegReadStrbuf(hKey, L"SystemSKU", &host->productSku, NULL);
ffCleanUpSmbiosValue(&host->productSku);
ffRegReadStrbuf(hKey, L"SystemManufacturer", &host->sysVendor, NULL);
ffCleanUpSmbiosValue(&host->sysVendor);
return NULL;
}