aboutsummaryrefslogtreecommitdiff
path: root/modules/devices
diff options
context:
space:
mode:
authorboris <boris.afonot@gmail.com>2022-07-23 20:34:50 +0300
committerL. A. F. Pereira <l@tia.mat.br>2022-07-24 04:38:59 +0000
commitd59a39c4e7534e83b3f1072c4ef5f39393ea8580 (patch)
treee634e047c0269bc9e91dac9ab755cc275df991e2 /modules/devices
parent5acf7ea315c98e915506a1ab1ed5c2787edf8be4 (diff)
update display e2k processors: always in table
Diffstat (limited to 'modules/devices')
-rw-r--r--modules/devices/e2k/processor.c45
1 files changed, 20 insertions, 25 deletions
diff --git a/modules/devices/e2k/processor.c b/modules/devices/e2k/processor.c
index 620e5330..c1e57926 100644
--- a/modules/devices/e2k/processor.c
+++ b/modules/devices/e2k/processor.c
@@ -346,35 +346,30 @@ gchar *processor_get_info(GSList * processors)
{
Processor *processor;
- if (g_slist_length(processors) > 1) {
- gchar *ret, *tmp, *hashkey;
- GSList *l;
+ gchar *ret, *tmp, *hashkey;
+ GSList *l;
- tmp = g_strdup("");
+ tmp = g_strdup("");
- for (l = processors; l; l = l->next) {
- processor = (Processor *) l->data;
-
- tmp = g_strdup_printf("%s$CPU%d$%s=%.2f %s\n",
- tmp, processor->id,
- processor->model_name,
- processor->cpu_mhz, _("MHz"));
-
- hashkey = g_strdup_printf("CPU%d", processor->id);
- moreinfo_add_with_prefix("DEV", hashkey,
- processor_get_detailed_info(processor));
- g_free(hashkey);
- }
+ for (l = processors; l; l = l->next) {
+ processor = (Processor *) l->data;
- ret = g_strdup_printf("[$ShellParam$]\n"
- "ViewType=1\n"
- "[Processors]\n"
- "%s", tmp);
- g_free(tmp);
+ tmp = g_strdup_printf("%s$CPU%d$%s=%.2f %s\n",
+ tmp, processor->id,
+ processor->model_name,
+ processor->cpu_mhz, _("MHz"));
- return ret;
+ hashkey = g_strdup_printf("CPU%d", processor->id);
+ moreinfo_add_with_prefix("DEV", hashkey,
+ processor_get_detailed_info(processor));
+ g_free(hashkey);
}
- processor = (Processor *) processors->data;
- return processor_get_detailed_info(processor);
+ ret = g_strdup_printf("[$ShellParam$]\n"
+ "ViewType=1\n"
+ "[Processors]\n"
+ "%s", tmp);
+ g_free(tmp);
+
+ return ret;
}