summaryrefslogtreecommitdiffstats
path: root/usb.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 /usb.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 'usb.c')
-rw-r--r--usb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usb.c b/usb.c
index fbb23a3..2f5fa3a 100644
--- a/usb.c
+++ b/usb.c
@@ -6,7 +6,14 @@
#include "common.h"
static void usb_find_modules(struct pciusb_entries entries) {
- pciusb_find_modules(entries, "/usr/share/ldetect-lst/usbtable");
+ char *share_path = getenv("SHARE_PATH");
+ char *usbtable;
+
+ if (!share_path || !*share_path) share_path = "/usr/share";
+ usbtable = alloca(strlen(share_path) + 32); /* enough for /ldetect-lst/pcitable and EOS */
+ sprintf(usbtable, "%s/ldetect-lst/usbtable", share_path);
+
+ pciusb_find_modules(entries, usbtable);
}
extern struct pciusb_entries usb_probe(void) {