diff options
author | Ondrej Čerman <ondrej.cerman@gmail.com> | 2019-12-28 14:36:23 +0100 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2019-12-28 11:05:40 -0800 |
commit | 145d70e0a9696e194168eafadb3600c034df9e08 (patch) | |
tree | 673a0500d3859d952407a39f56a9cabb953e4319 /modules/devices/pci.c | |
parent | 0e6f373d203da16bd41b3199915e7fea97d944d6 (diff) |
pci: Remove duplicated vendor tags
Diffstat (limited to 'modules/devices/pci.c')
-rw-r--r-- | modules/devices/pci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/devices/pci.c b/modules/devices/pci.c index 6efb425c..6cd0b606 100644 --- a/modules/devices/pci.c +++ b/modules/devices/pci.c @@ -64,7 +64,7 @@ static gchar *_pci_dev(const pcid *p, gchar *icons) { gchar *class, *vendor, *svendor, *product, *sproduct; gchar *name, *key; - gboolean vendor_is_svendor = (p->vendor_id == p->sub_vendor_id && p->device_id == p->sub_device_id); + gboolean device_is_sdevice = (p->vendor_id == p->sub_vendor_id && p->device_id == p->sub_device_id); class = UNKIFNULL_AC(p->class_str); vendor = UNKIFNULL_AC(p->vendor_id_str); @@ -75,7 +75,7 @@ static gchar *_pci_dev(const pcid *p, gchar *icons) { gchar *ven_tag = vendor_match_tag(p->vendor_id_str, params.fmt_opts); gchar *sven_tag = vendor_match_tag(p->sub_vendor_id_str, params.fmt_opts); if (ven_tag) { - if (sven_tag && !vendor_is_svendor) { + if (sven_tag && p->vendor_id != p->sub_vendor_id) { name = g_strdup_printf("%s %s %s", sven_tag, ven_tag, product); } else { name = g_strdup_printf("%s %s", ven_tag, product); @@ -92,7 +92,7 @@ static gchar *_pci_dev(const pcid *p, gchar *icons) { icons = h_strdup_cprintf("Icon$%s$%04x:%02x:%02x.%01x=%s\n", icons, key, p->domain, p->bus, p->device, p->function, find_icon_for_class(p->class)); gchar *vendor_device_str; - if (vendor_is_svendor) { + if (device_is_sdevice) { vendor_device_str = g_strdup_printf( /* Vendor */ "$^$%s=[%04x] %s\n" /* Device */ "%s=[%04x] %s\n", |