aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hardinfo2/arch/linux/alpha/processor.h13
-rw-r--r--hardinfo2/arch/linux/armv4l/processor.h9
-rw-r--r--hardinfo2/arch/linux/ia64/processor.h14
-rw-r--r--hardinfo2/arch/linux/m68k/processor.h7
-rw-r--r--hardinfo2/arch/linux/mips/processor.h6
-rw-r--r--hardinfo2/arch/linux/parisc/processor.h11
-rw-r--r--hardinfo2/arch/linux/ppc/processor.h7
-rw-r--r--hardinfo2/arch/linux/s390/processor.h12
-rw-r--r--hardinfo2/arch/linux/sparc/processor.h5
-rw-r--r--hardinfo2/arch/linux/x86/processor.h16
-rw-r--r--hardinfo2/devices.c21
-rw-r--r--hardinfo2/util.c11
12 files changed, 100 insertions, 32 deletions
diff --git a/hardinfo2/arch/linux/alpha/processor.h b/hardinfo2/arch/linux/alpha/processor.h
index 8c2df2b1..081a4f7d 100644
--- a/hardinfo2/arch/linux/alpha/processor.h
+++ b/hardinfo2/arch/linux/alpha/processor.h
@@ -16,6 +16,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+struct _Processor {
+ gchar *model_name;
+ gfloat bogomips;
+ gchar *strmodel;
+};
+
static GSList *
__scan_processors(void)
{
@@ -57,9 +63,10 @@ processor_get_info(GSList *processors)
{
Processor *processor = (Processor *)processors->data;
- return g_strdup_printf("[Processor] %s\n"
- "Plataform String=%s\n"
- "BogoMips=%.2f"
+ return g_strdup_printf("[Processor]\n"
+ "Model=%s\n"
+ "Platform String=%s\n"
+ "BogoMIPS=%.2f"
"Byte Order=%s\n",
processor->model_name,
processor->strmodel,
diff --git a/hardinfo2/arch/linux/armv4l/processor.h b/hardinfo2/arch/linux/armv4l/processor.h
index 773e4acc..d66d6f25 100644
--- a/hardinfo2/arch/linux/armv4l/processor.h
+++ b/hardinfo2/arch/linux/armv4l/processor.h
@@ -16,6 +16,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+struct _Processor {
+ gchar *model_name;
+ gchar *flags;
+ gfloat bogomips;
+
+ gchar *has_fpu;
+};
+
+
static GSList *
__scan_processors(void)
{
diff --git a/hardinfo2/arch/linux/ia64/processor.h b/hardinfo2/arch/linux/ia64/processor.h
index 2015ed78..bc1d7f08 100644
--- a/hardinfo2/arch/linux/ia64/processor.h
+++ b/hardinfo2/arch/linux/ia64/processor.h
@@ -16,6 +16,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+struct _Processor {
+ gchar *model_name;
+ gchar *vendor_id;
+ gfloat bogomips;
+ gchar *strmodel;
+};
+
static GSList *
__scan_processors(void)
{
@@ -54,10 +61,11 @@ processor_get_info(GSList *processors)
{
Processor *processor = (Processor *)processors->data;
- return g_strdup_printf("[Processor] %s\n"
- "Arch=%s\n"
+ return g_strdup_printf("[Processor]\n"
+ "Model=%s\n"
+ "Architecture=%s\n"
"Family=%sMHz\n"
- "BogoMips=%s\n"
+ "BogoMIPS=%s\n"
"Byte Order=%s\n",
processor->model_name,
processor->vendor_id,
diff --git a/hardinfo2/arch/linux/m68k/processor.h b/hardinfo2/arch/linux/m68k/processor.h
index 3e9a1dae..0fb59d24 100644
--- a/hardinfo2/arch/linux/m68k/processor.h
+++ b/hardinfo2/arch/linux/m68k/processor.h
@@ -16,6 +16,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+struct _Processor {
+ gchar *model_name;
+ gfloat bogomips, cpu_mhz;
+
+ gchar *has_fpu;
+};
+
static GSList *
__scan_processors(void)
{
diff --git a/hardinfo2/arch/linux/mips/processor.h b/hardinfo2/arch/linux/mips/processor.h
index 1dabe365..1aa7794d 100644
--- a/hardinfo2/arch/linux/mips/processor.h
+++ b/hardinfo2/arch/linux/mips/processor.h
@@ -16,6 +16,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+struct _Processor {
+ gchar *model_name;
+ gchar *vendor_id;
+ gfloat bogomips, cpu_mhz;
+};
+
static GSList *
__scan_processors(void)
{
diff --git a/hardinfo2/arch/linux/parisc/processor.h b/hardinfo2/arch/linux/parisc/processor.h
index 5d314c2c..357f4d83 100644
--- a/hardinfo2/arch/linux/parisc/processor.h
+++ b/hardinfo2/arch/linux/parisc/processor.h
@@ -16,6 +16,17 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+struct _Processor {
+ gchar *model_name;
+ gchar *vendor_id;
+ gchar *flags;
+ gfloat bogomips, cpu_mhz;
+
+ gchar *has_fpu;
+
+ gchar *strmodel;
+};
+
static GSList *
__scan_processors(void)
{
diff --git a/hardinfo2/arch/linux/ppc/processor.h b/hardinfo2/arch/linux/ppc/processor.h
index 4da514d2..6aa0f4ef 100644
--- a/hardinfo2/arch/linux/ppc/processor.h
+++ b/hardinfo2/arch/linux/ppc/processor.h
@@ -16,6 +16,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+struct _Processor {
+ gchar *model_name;
+ gchar *vendor_id;
+ gint cache_size;
+ gfloat bogomips, cpu_mhz;
+};
+
static GSList *
__scan_processors(void)
{
diff --git a/hardinfo2/arch/linux/s390/processor.h b/hardinfo2/arch/linux/s390/processor.h
index 6172887e..ee72b029 100644
--- a/hardinfo2/arch/linux/s390/processor.h
+++ b/hardinfo2/arch/linux/s390/processor.h
@@ -16,6 +16,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+struct _Processor {
+ gchar *vendor_id, *model_name;
+ gint cache_size;
+ gfloat bogomips;
+};
+
static GSList *
__scan_processors(void)
{
@@ -36,7 +42,7 @@ __scan_processors(void)
tmp[1] = g_strstrip(tmp[1]);
get_str("vendor_id", processor->vendor_id);
- get_float("# processors", processor->processors);
+ get_float("# processors", processor->cache_size);
get_int("bogomips per cpu", processor->bogomips);
}
@@ -44,6 +50,7 @@ __scan_processors(void)
}
processor->model_name = g_strconcat("S390 ", processor->vendor_id, NULL);
+ g_free(processor->vendor_id);
fclose(cpuinfo);
@@ -56,11 +63,12 @@ processor_get_info(GSList *processors)
Processor *processor = (Processor *)processors->data;
return g_strdup_printf("[Processor]\n"
+ "Model=%s\n"
"Processors=%d\n"
"BogoMips per CPU=%.2f"
"Byte Order=%s\n",
processor->model_name,
- processor->processors,
+ processor->cache_size,
processor->bogomips,
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
"Little Endian"
diff --git a/hardinfo2/arch/linux/sparc/processor.h b/hardinfo2/arch/linux/sparc/processor.h
index 761bf446..04e38c33 100644
--- a/hardinfo2/arch/linux/sparc/processor.h
+++ b/hardinfo2/arch/linux/sparc/processor.h
@@ -16,6 +16,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+struct _Processor {
+ gchar *model_name;
+ gchar *has_fpu;
+};
+
static GSList *
__scan_processors(void)
{
diff --git a/hardinfo2/arch/linux/x86/processor.h b/hardinfo2/arch/linux/x86/processor.h
index a756a958..e9985d2c 100644
--- a/hardinfo2/arch/linux/x86/processor.h
+++ b/hardinfo2/arch/linux/x86/processor.h
@@ -16,6 +16,22 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+struct _Processor {
+ gchar *model_name;
+ gchar *vendor_id;
+ gchar *flags;
+ gint cache_size;
+ gfloat bogomips, cpu_mhz;
+
+ gchar *has_fpu;
+ gchar *bug_fdiv, *bug_hlt, *bug_f00f, *bug_coma;
+
+ gint model, family, stepping;
+ gchar *strmodel;
+
+ gint id;
+};
+
/*
* This function is partly based on x86cpucaps
* by Osamu Kayasono <jacobi@jcom.home.ne.jp>
diff --git a/hardinfo2/devices.c b/hardinfo2/devices.c
index 34d4dbcf..d052722d 100644
--- a/hardinfo2/devices.c
+++ b/hardinfo2/devices.c
@@ -77,7 +77,7 @@ static GSList *processors = NULL;
static gchar *printer_list = NULL;
static gchar *pci_list = "";
static gchar *input_list = NULL;
-static gchar *storage_list = "";
+static gchar *storage_list = NULL;
static gchar *battery_list = NULL;
#define WALK_UNTIL(x) while((*buf != '\0') && (*buf != x)) buf++
@@ -111,21 +111,6 @@ static gchar *battery_list = NULL;
#include <vendor.h>
typedef struct _Processor Processor;
-struct _Processor {
- gchar *model_name;
- gchar *vendor_id;
- gchar *flags;
- gint cache_size;
- gfloat bogomips, cpu_mhz;
-
- gchar *has_fpu;
- gchar *bug_fdiv, *bug_hlt, *bug_f00f, *bug_coma;
-
- gint model, family, stepping;
- gchar *strmodel;
-
- gint id;
-};
#include <arch/this/processor.h>
@@ -255,8 +240,8 @@ void
scan_storage(gboolean reload)
{
SCAN_START();
- if (*storage_list)
- g_free(storage_list);
+ g_free(storage_list);
+ storage_list = g_strdup("");
__scan_ide_devices();
__scan_scsi_devices();
diff --git a/hardinfo2/util.c b/hardinfo2/util.c
index fe8c1678..3af626c7 100644
--- a/hardinfo2/util.c
+++ b/hardinfo2/util.c
@@ -401,7 +401,7 @@ static void module_register_methods(ShellModule *module)
g_hash_table_insert(__module_methods, method_name, method.function);
g_free(name);
- DEBUG("registering method %s", method_name);
+ DEBUG("Registered method: %s", method_name);
if (!(*(++methods)).name)
break;
@@ -417,6 +417,8 @@ gchar *module_call_method(gchar *method)
if (__module_methods == NULL) {
return NULL;
}
+
+ DEBUG("Calling method: %s", method);
function = g_hash_table_lookup(__module_methods, method);
return function ? g_strdup(function()) :
@@ -803,7 +805,8 @@ void tree_view_save_image(gchar *filename)
static gboolean __idle_free_do(gpointer ptr)
{
- DEBUG("collecting garbage: %p", ptr);
+ DEBUG("Collecting Garbage: %p", ptr);
+ DEBUG(" Data: %20s", (gchar*)ptr);
g_free(ptr);
@@ -852,13 +855,9 @@ void module_entry_reload(ShellModuleEntry *module_entry)
void module_entry_scan(ShellModuleEntry *module_entry)
{
- shell_status_update(idle_free(g_strdup_printf("Scanning: %s...", module_entry->name)));
-
if (module_entry->scan_func) {
module_entry->scan_func(FALSE);
}
-
- shell_status_update("Done.");
}
gchar *module_entry_function(ShellModuleEntry *module_entry)