diff options
author | Francois Pons <fpons@mandriva.com> | 2001-03-06 16:17:32 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-03-06 16:17:32 +0000 |
commit | 8689a6a4250656cddb28f836ec09dffcffbb0f2c (patch) | |
tree | fdda126cc321f652657519f8b1effa594abc4e81 /usb.c | |
parent | 6a586cb594b851b6d0cdb5de6d3305875967fe30 (diff) | |
download | ldetect-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.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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) { |