aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2017-07-09 13:31:10 -0500
committerLeandro Pereira <leandro@hardinfo.org>2017-07-12 19:38:41 -0700
commitace9c299ee461a4eb63f94de2a3f48ce4480248e (patch)
tree50a80dd5754d70d1f41a5f16a2c328ca43c17fb0
parent3825fd33d7a360d7632a48322676238a1daa197f (diff)
sparc: add cpu capabilities list
Also, fixes a bug found in testing. Signed-off-by: Burt P <pburt0@gmail.com>
-rw-r--r--includes/sparc/processor-platform.h1
-rw-r--r--modules/devices/sparc/processor.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/includes/sparc/processor-platform.h b/includes/sparc/processor-platform.h
index bcf4c782..31748a5b 100644
--- a/includes/sparc/processor-platform.h
+++ b/includes/sparc/processor-platform.h
@@ -23,6 +23,7 @@ struct _Processor {
gchar *model_name;
gchar *has_fpu;
gfloat cpu_mhz;
+ gchar *cpucaps;
};
#endif /* __PROCESSOR_PLATFORM_H__ */
diff --git a/modules/devices/sparc/processor.c b/modules/devices/sparc/processor.c
index 9310c45d..05103a2b 100644
--- a/modules/devices/sparc/processor.c
+++ b/modules/devices/sparc/processor.c
@@ -50,6 +50,7 @@ processor_scan(void)
tmp[0] = g_strstrip(tmp[0]);
tmp[1] = g_strstrip(tmp[1]);
+ get_str("cpucaps", processor->cpucaps);
get_str("cpu", processor->model_name);
get_str("fpu", processor->has_fpu);
}
@@ -71,9 +72,12 @@ processor_get_info(GSList *processors)
return g_strdup_printf("[%s]\n"
"CPU=%s\n"
"FPU=%s\n"
- "%s=%s\n", /* byte order */
+ "%s=%s\n" /* byte order */
+ "%s=%s\n",
_("Processor"),
processor->model_name,
processor->has_fpu,
- _("Byte Order"), byte_order_str() );
+ _("Byte Order"), byte_order_str(),
+ _("Capabilities"), processor->cpucaps
+ );
}