prefer ProcessorNameString to Indentifier for cpu model name

This commit is contained in:
Doug MacEachern 2004-07-02 01:26:45 +00:00
parent 4df7191361
commit 77b2883e1e
1 changed files with 7 additions and 2 deletions

View File

@ -289,10 +289,15 @@ int sigar_cpu_info_get(sigar_t *sigar, sigar_cpu_info_t *info)
} }
size = sizeof(info->model); size = sizeof(info->model);
if (RegQueryValueEx(cpu, "Identifier", NULL, NULL, if (RegQueryValueEx(cpu, "ProcessorNameString", NULL, NULL,
(LPVOID)&info->model, &size)) (LPVOID)&info->model, &size))
{ {
SIGAR_SSTRCPY(info->vendor, "x86"); size = sizeof(info->model);
if (RegQueryValueEx(cpu, "Identifier", NULL, NULL,
(LPVOID)&info->model, &size))
{
SIGAR_SSTRCPY(info->model, "x86");
}
} }
size = sizeof(info->mhz); // == sizeof(DWORD) size = sizeof(info->mhz); // == sizeof(DWORD)