Skip to content

Commit

Permalink
Improved e2k support, added vendor data
Browse files Browse the repository at this point in the history
  • Loading branch information
afonot authored and lpereira committed Jul 24, 2022
1 parent d59a39c commit de58137
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 6 deletions.
53 changes: 53 additions & 0 deletions data/vendor.ids
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,59 @@ name Maxtor
url www.maxtor.com
match_string Maxtor

name AO MCST
name_short MCST
url www.mcst.ru
url_support www.mcst.ru/support
ansi_color 0;34;107
match_string EL2S4
match_string MBE1C-PC
match_string MONOCUB
match_string E8C
match_string E8C-SWTX
match_string_prefix MBE8C-PC
match_string Elbrus-MCST

name AO MCST
name_short Information:
url www.mcst.ru/elbrus-4c
match_string E2S

name AO MCST
name_short Information:
url www.mcst.ru/elbrus-1c-plus
match_string E1C+

name AO MCST
name_short Information:
url www.mcst.ru/elbrus-2c-plus
match_string E2C+DSP

name AO MCST
name_short Information:
url www.mcst.ru/elbrus-8c
match_string E8C

name AO MCST
name_short Information:
url www.mcst.ru/elbrus-8cb
match_string E8C2

name AO MCST
name_short Information:
url www.mcst.ru/elbrus-12c
match_string E12C

name AO MCST
name_short Information:
url www.mcst.ru/elbrus-16c
match_string E16C

name AO MCST
name_short Information:
url www.mcst.ru/elbrus-2c3
match_string E2C3

name MediaTek
url www.mediatek.com
wikipedia MediaTek
Expand Down
25 changes: 19 additions & 6 deletions modules/devices/e2k/processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ processor_get_detailed_info(Processor *processor)
cache_info = __cache_get_info_as_string(processor);

ret = g_strdup_printf("[%s]\n"
"%s=%s\n" /* name */
"%s=%s\n" /* vendor */
"$^$%s=%s\n" /* name */
"$^$%s=%s\n" /* vendor */
"%s=%d\n" /* family */
"%s=%d\n" /* model */
"%s=%d\n" /* revision */
Expand Down Expand Up @@ -348,16 +348,23 @@ gchar *processor_get_info(GSList * processors)

gchar *ret, *tmp, *hashkey;
GSList *l;
gchar *icons=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",
gchar *model_name = g_strdup_printf("MCST Elbrus %s", processor->model_name);
const Vendor *v = vendor_match(processor->vendor_id, NULL);
if (v)
tag_vendor(&model_name, 0, v->name_short ? v->name_short : v->name, v->ansi_color, params.fmt_opts);

tmp = g_strdup_printf("%s$CPU%d$cpu%d=%.2f %s|%s\n",
tmp, processor->id,
processor->model_name,
processor->cpu_mhz, _("MHz"));
processor->id,
processor->cpu_mhz, _("MHz"),
model_name);

hashkey = g_strdup_printf("CPU%d", processor->id);
moreinfo_add_with_prefix("DEV", hashkey,
Expand All @@ -367,9 +374,15 @@ gchar *processor_get_info(GSList * processors)

ret = g_strdup_printf("[$ShellParam$]\n"
"ViewType=1\n"
"ColumnTitle$TextValue=%s\n"
"ColumnTitle$Value=%s\n"
"ColumnTitle$Extra1=%s\n"
"ShowColumnHeaders=true\n"
"%s"
"[Processors]\n"
"%s", tmp);
"%s", _("Device"), _("Frequency"), _("Model"), icons, tmp);
g_free(tmp);
g_free(icons);

return ret;
}

0 comments on commit de58137

Please sign in to comment.