aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hardinfo2/benchmark.c30
-rw-r--r--hardinfo2/devices.c7
-rw-r--r--hardinfo2/shell.c3
3 files changed, 27 insertions, 13 deletions
diff --git a/hardinfo2/benchmark.c b/hardinfo2/benchmark.c
index 1018f395..195048cd 100644
--- a/hardinfo2/benchmark.c
+++ b/hardinfo2/benchmark.c
@@ -346,26 +346,32 @@ static gchar *get_benchmark_results()
gint i = G_N_ELEMENTS(entries) - 1;
gchar *machine = module_call_method("devices::getProcessorName");
- gchar *param = g_strdup_printf("[param]\n"
- "machine=%s\n" "nbenchmarks=%d\n",
- machine, i);
- gchar *result = param;
-
+ gchar *machineclock = module_call_method("devices::getProcessorFrequency");
+ gchar *machineram = module_call_method("devices::getMemoryTotal");
+ gchar *result = g_strdup_printf("[param]\n"
+ "machine=%s\n"
+ "machineclock=%s\n"
+ "machineram=%s\n"
+ "nbenchmarks=%d\n",
+ machine,
+ machineclock,
+ machineram, i);
for (; i >= 0; i--) {
if ((scan_callback = entries[i].scan_callback)) {
scan_callback(FALSE);
- result = g_strdup_printf("%s\n"
- "[bench%d]\n"
- "name=%s\n"
- "value=%f\n",
- result,
- i, entries[i].name, bench_results[i]);
+ result = h_strdup_cprintf("[bench%d]\n"
+ "name=%s\n"
+ "value=%f\n",
+ result,
+ i, entries[i].name, bench_results[i]);
}
}
g_free(machine);
- g_free(param);
+ g_free(machineclock);
+ g_free(machineram);
+ g_free(result);
return result;
}
diff --git a/hardinfo2/devices.c b/hardinfo2/devices.c
index 0e76a50a..26dd3c0f 100644
--- a/hardinfo2/devices.c
+++ b/hardinfo2/devices.c
@@ -201,12 +201,19 @@ gchar *get_pci_device_description(gchar *pci_id)
return NULL;
}
+gchar *get_memory_total(void)
+{
+ /* FIXME */
+ return g_strdup("0.0");
+}
+
ShellModuleMethod *hi_exported_methods(void)
{
static ShellModuleMethod m[] = {
{"getProcessorCount", get_processor_count},
{"getProcessorName", get_processor_name},
{"getProcessorFrequency", get_processor_frequency},
+ {"getMemoryTotal", get_memory_total},
{"getStorageDevices", get_storage_devices},
{"getPrinters", get_printers},
{"getInputDevices", get_input_devices},
diff --git a/hardinfo2/shell.c b/hardinfo2/shell.c
index 7b560c8f..8ae2fd3b 100644
--- a/hardinfo2/shell.c
+++ b/hardinfo2/shell.c
@@ -919,7 +919,8 @@ group_handle_normal(GKeyFile * key_file, ShellModuleEntry * entry,
} else {
gtk_tree_store_append(store, &child, &parent);
}
-
+
+ /* FIXME: use g_key_file_get_string_list? */
if (strchr(value, '|')) {
gchar **columns = g_strsplit(value, "|", 0);