Fix Linux cpu_info /proc/cpuinfo parsing on ia64

This commit is contained in:
Doug MacEachern 2006-09-20 22:05:54 +00:00
parent 33f868b53d
commit f3137cb53a
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2006-09-21 Doug MacEachern <dougm@hyperic.net>
* Fix Linux cpu_info /proc/cpuinfo parsing on ia64
2006-09-08 Doug MacEachern <dougm@hyperic.net> 2006-09-08 Doug MacEachern <dougm@hyperic.net>
* [SIGAR-13] Use EnumProcesses for sigar_proc_list_get on Win32 * [SIGAR-13] Use EnumProcesses for sigar_proc_list_get on Win32

View File

@ -1510,7 +1510,8 @@ static int get_cpu_info(sigar_t *sigar, sigar_cpu_info_t *info,
} }
break; break;
case 'v': case 'v':
if (strnEQ(ptr, "vendor_id", 9)) { /* "vendor_id" or "vendor" */
if (strnEQ(ptr, "vendor", 6)) {
cpu_info_strcpy(ptr, info->vendor, sizeof(info->vendor)); cpu_info_strcpy(ptr, info->vendor, sizeof(info->vendor));
if (strEQ(info->vendor, "GenuineIntel")) { if (strEQ(info->vendor, "GenuineIntel")) {
SIGAR_SSTRCPY(info->vendor, "Intel"); SIGAR_SSTRCPY(info->vendor, "Intel");
@ -1520,6 +1521,13 @@ static int get_cpu_info(sigar_t *sigar, sigar_cpu_info_t *info,
} }
} }
break; break;
case 'f':
if (strnEQ(ptr, "family", 6)) {
/* IA64 version of "model name" */
cpu_info_strcpy(ptr, info->model, sizeof(info->model));
sigar_cpu_model_adjust(sigar, info);
}
break;
case 'm': case 'm':
if (strnEQ(ptr, "model name", 10)) { if (strnEQ(ptr, "model name", 10)) {
cpu_info_strcpy(ptr, info->model, sizeof(info->model)); cpu_info_strcpy(ptr, info->model, sizeof(info->model));