From 263b68ba53babe8d42dff55aa9548924a32a7379 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 23 Jun 2004 02:32:38 +0000 Subject: [PATCH] better cpu vendor guess if x86 --- src/os/solaris/solaris_sigar.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/os/solaris/solaris_sigar.c b/src/os/solaris/solaris_sigar.c index 38f983bb..d3603fd9 100644 --- a/src/os/solaris/solaris_sigar.c +++ b/src/os/solaris/solaris_sigar.c @@ -768,8 +768,18 @@ int sigar_cpu_infos_get(sigar_t *sigar, info = &cpu_infos->data[cpu_infos->number++]; - SIGAR_SSTRCPY(info->vendor, "Sun Microsystems"); /*XXX?*/ + SIGAR_SSTRCPY(info->model, stats.pi_processor_type); + + if (strEQ(info->model, "i386")) { + /* XXX assuming Intel on x86 */ + SIGAR_SSTRCPY(info->vendor, "Intel"); + } + else { + /* sparc */ + SIGAR_SSTRCPY(info->vendor, "Sun Microsystems"); + } + info->mhz = stats.pi_clock; info->cache_size = -1; /*XXX*/ }