diff options
Diffstat (limited to 'plugins/sysinfo/pci.c')
-rw-r--r-- | plugins/sysinfo/pci.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/sysinfo/pci.c b/plugins/sysinfo/pci.c index 221df850..aba04e68 100644 --- a/plugins/sysinfo/pci.c +++ b/plugins/sysinfo/pci.c @@ -27,8 +27,6 @@ #include <pci/pci.h> #include "xsys.h" -#define PCIIDS "/usr/share/misc/pci.ids" - static struct pci_filter filter; /* Device filter */ static struct pci_access *pacc; int bus, dev, func; /* Location of the card */ @@ -112,9 +110,15 @@ int pci_find_by_class(u16 *class, char *vendor, char *device) void pci_find_fullname(char *fullname, char *vendor, char *device) { - char buffer[bsize], vendorname[bsize/2] = "", devicename[bsize/2] = "", *position; + char buffer[bsize]; + char vendorname[bsize/2] = ""; + char devicename[bsize/2] = ""; + char *position; int cardfound = 0; - FILE *fp = fopen(PCIIDS, "r"); + + sysinfo_get_pciids (buffer); + FILE *fp = fopen (buffer, "r"); + if(fp == NULL) { snprintf(fullname, bsize, "%s:%s", vendor, device); return; |