summary refs log tree commit diff stats
path: root/plugins/sysinfo/pci.c
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-10-21 09:56:09 +0200
committerBerke Viktor <bviktor@hexchat.org>2012-10-21 09:56:09 +0200
commit3d01c7824821688c9213e5789570cfc647f4cdb9 (patch)
treec3c6adb5b1e1b67994f6d41ef827e5c64cdf91c9 /plugins/sysinfo/pci.c
parent62c9375bc9e3d4b9cc8abd5fc1c4cccb621382b5 (diff)
First bunch of fixes to SysInfo-Unix, now it works - barely
Diffstat (limited to 'plugins/sysinfo/pci.c')
-rw-r--r--plugins/sysinfo/pci.c12
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;