diff options
| author | boris <boris.afonot@gmail.com> | 2022-07-23 21:16:25 +0300 | 
|---|---|---|
| committer | L. A. F. Pereira <l@tia.mat.br> | 2022-07-24 04:38:59 +0000 | 
| commit | de581379d0edfa32b161aef2d77ca94706783f65 (patch) | |
| tree | 310e12a7488eba529ab1a6d2c8e6f9b0e613224d | |
| parent | d59a39c4e7534e83b3f1072c4ef5f39393ea8580 (diff) | |
Improved e2k support, added vendor data
| -rw-r--r-- | data/vendor.ids | 53 | ||||
| -rw-r--r-- | modules/devices/e2k/processor.c | 25 | 
2 files changed, 72 insertions, 6 deletions
| diff --git a/data/vendor.ids b/data/vendor.ids index f41a2486..06c7a041 100644 --- a/data/vendor.ids +++ b/data/vendor.ids @@ -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 diff --git a/modules/devices/e2k/processor.c b/modules/devices/e2k/processor.c index c1e57926..55e93e6d 100644 --- a/modules/devices/e2k/processor.c +++ b/modules/devices/e2k/processor.c @@ -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 */ @@ -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, @@ -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;  } | 
