aboutsummaryrefslogtreecommitdiff
path: root/modules/devices
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2019-12-27 17:19:22 -0600
committerLeandro A. F. Pereira <leandro@hardinfo.org>2019-12-27 22:16:36 -0800
commit8b2d0761660eff87a5d6cfc6eae2002961ba064a (patch)
treebb55b7d5818fe894b89aa15577bffbaf6e69911e /modules/devices
parent74fe3984106ac559a2bea67a6f6fcdd5d2ca5464 (diff)
dmi: use vendor flag for vendor fields
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/devices')
-rw-r--r--modules/devices/dmi.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/modules/devices/dmi.c b/modules/devices/dmi.c
index c4b786f3..c5cad3e8 100644
--- a/modules/devices/dmi.c
+++ b/modules/devices/dmi.c
@@ -30,28 +30,29 @@ struct _DMIInfo {
const gchar *name;
const gchar *id_str;
int group;
+ gboolean maybe_vendor;
};
DMIInfo dmi_info_table[] = {
{ N_("Product"), NULL, 1 },
{ N_("Name"), "system-product-name", 0 },
{ N_("Family"), "system-product-family", 0 },
- { N_("Vendor"), "system-manufacturer", 0 },
+ { N_("Vendor"), "system-manufacturer", 0, TRUE },
{ N_("Version"), "system-version", 0 },
{ N_("Serial Number"), "system-serial-number", 0 },
{ N_("SKU"), "system-sku", 0 },
{ N_("BIOS"), NULL, 1 },
{ N_("Date"), "bios-release-date", 0 },
- { N_("Vendor"), "bios-vendor", 0 },
+ { N_("Vendor"), "bios-vendor", 0, TRUE },
{ N_("Version"), "bios-version", 0 },
{ N_("Board"), NULL, 1 },
{ N_("Name"), "baseboard-product-name", 0 },
- { N_("Vendor"), "baseboard-manufacturer", 0 },
+ { N_("Vendor"), "baseboard-manufacturer", 0, TRUE },
{ N_("Version"), "baseboard-version", 0 },
{ N_("Serial Number"), "baseboard-serial-number", 0 },
{ N_("Asset Tag"), "baseboard-asset-tag", 0 },
{ N_("Chassis"), NULL, 1 },
- { N_("Vendor"), "chassis-manufacturer", 0 },
+ { N_("Vendor"), "chassis-manufacturer", 0, TRUE },
{ N_("Type"), "chassis-type", 0 },
{ N_("Version"), "chassis-version", 0 },
{ N_("Serial Number"), "chassis-serial-number", 0 },
@@ -125,10 +126,10 @@ gboolean dmi_get_info(void)
break;
case 3: /* good value */
{
- gchar *link = vendor_get_link(value);
dmi_info =
- h_strdup_cprintf("%s=%s\n", dmi_info, _(info->name), link);
- g_free(link);
+ h_strdup_cprintf("%s%s=%s\n", dmi_info,
+ info->maybe_vendor ? "$^$" : "",
+ _(info->name), value);
add_to_moreinfo(group, info->name, value);
dmi_succeeded = TRUE;
break;