Fix Linux cpu_info /proc/cpuinfo parsing on ia64

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

No files matched your search

+9 -1
View File
@@ -1510,7 +1510,8 @@ static int get_cpu_info(sigar_t *sigar, sigar_cpu_info_t *info,
}
break;
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));
if (strEQ(info->vendor, "GenuineIntel")) {
SIGAR_SSTRCPY(info->vendor, "Intel");
@@ -1520,6 +1521,13 @@ static int get_cpu_info(sigar_t *sigar, sigar_cpu_info_t *info,
}
}
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':
if (strnEQ(ptr, "model name", 10)) {
cpu_info_strcpy(ptr, info->model, sizeof(info->model));