summaryrefslogtreecommitdiffstats
path: root/pci.c
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-03-06 16:17:32 +0000
committerFrancois Pons <fpons@mandriva.com>2001-03-06 16:17:32 +0000
commit8689a6a4250656cddb28f836ec09dffcffbb0f2c (patch)
treefdda126cc321f652657519f8b1effa594abc4e81 /pci.c
parent6a586cb594b851b6d0cdb5de6d3305875967fe30 (diff)
downloadldetect-8689a6a4250656cddb28f836ec09dffcffbb0f2c.tar
ldetect-8689a6a4250656cddb28f836ec09dffcffbb0f2c.tar.gz
ldetect-8689a6a4250656cddb28f836ec09dffcffbb0f2c.tar.bz2
ldetect-8689a6a4250656cddb28f836ec09dffcffbb0f2c.tar.xz
ldetect-8689a6a4250656cddb28f836ec09dffcffbb0f2c.zip
*** empty log message ***
Diffstat (limited to 'pci.c')
-rw-r--r--pci.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/pci.c b/pci.c
index 20266c7..94be8ef 100644
--- a/pci.c
+++ b/pci.c
@@ -6,7 +6,14 @@
#include "common.h"
static void pci_find_modules(struct pciusb_entries entries) {
- pciusb_find_modules(entries, "/usr/share/ldetect-lst/pcitable");
+ char *share_path = getenv("SHARE_PATH");
+ char *pcitable;
+
+ if (!share_path || !*share_path) share_path = "/usr/share";
+ pcitable = alloca(strlen(share_path) + 32); /* enough for /ldetect-lst/pcitable and EOS */
+ sprintf(pcitable, "%s/ldetect-lst/pcitable", share_path);
+
+ pciusb_find_modules(entries, pcitable);
}
extern struct pciusb_entries pci_probe(int probe_type) {