diff options
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); } |