diff options
author | Agney Lopes Roth Ferraz <agney@debian.org> | 2007-04-09 11:45:31 -0300 |
---|---|---|
committer | Simon Quigley <tsimonq2@ubuntu.com> | 2017-06-19 14:38:41 -0500 |
commit | adb3993ba087ede46f62d5f018e17b07e99b5260 (patch) | |
tree | 67b4fa7e224f09d21eb76060422ca23e50e6dfe0 /arch/linux/common/pci.h | |
parent | b3e31ae3787c8806f48c85a52bba9aa3554e2c07 (diff) | |
parent | 11b8179a57e675c6672cbe649c655230ae3e9744 (diff) |
Import Debian changes 0.4.2.1-1
hardinfo (0.4.2.1-1) unstable; urgency=low
* New upstream release.
* Fixed segfault on device entry (Closes: #387955)
Diffstat (limited to 'arch/linux/common/pci.h')
-rw-r--r-- | arch/linux/common/pci.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/linux/common/pci.h b/arch/linux/common/pci.h index f8c9d319..e50691d0 100644 --- a/arch/linux/common/pci.h +++ b/arch/linux/common/pci.h @@ -17,7 +17,7 @@ */ void -scan_pci(void) +__scan_pci(void) { FILE *lspci; gchar buffer[256], *buf, *strhash = NULL, *strdevice = NULL; @@ -126,7 +126,7 @@ scan_pci(void) gpointer start, end; if (strdevice != NULL && strhash != NULL) { - g_hash_table_insert(devices, strhash, strdevice); + g_hash_table_insert(moreinfo, strhash, strdevice); g_free(category); g_free(name); } @@ -171,6 +171,17 @@ scan_pci(void) "Bus, device, function=%d, %d, %d\n", name, category, domain, bus, device, function); + + const gchar *url = vendor_get_url(name); + if (url) { + strdevice = g_strdup_printf("%s" + "Vendor=%s (%s)\n", + strdevice, + vendor_get_name(name), + url); + } + + pci_list = g_strdup_printf("%s$PCI%d$%s=%s\n", pci_list, n, category, name); @@ -183,7 +194,7 @@ scan_pci(void) pci_list = g_strconcat(pci_list, "No PCI devices found=\n", NULL); } else if (strhash) { /* insert the last device */ - g_hash_table_insert(devices, strhash, strdevice); + g_hash_table_insert(moreinfo, strhash, strdevice); g_free(category); g_free(name); } |