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 | |
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 ***
-rw-r--r-- | ldetect.spec | 7 | ||||
-rw-r--r-- | pci.c | 9 | ||||
-rw-r--r-- | usb.c | 9 |
3 files changed, 22 insertions, 3 deletions
diff --git a/ldetect.spec b/ldetect.spec index aea2b3d..6f5a46c 100644 --- a/ldetect.spec +++ b/ldetect.spec @@ -1,6 +1,6 @@ %define name ldetect %define version 0.2.3 -%define release 4mdk +%define release 5mdk Name: %{name} Version: %{version} @@ -9,6 +9,7 @@ Summary: Light hardware detection library Source: %{name}.tar.bz2 Group: System/Libraries BuildRoot: %{_tmppath}/%{name}-buildroot +BuildRequires: usbutils Requires: ldetect-lst Copyright: GPL Prefix: %{_prefix} @@ -47,6 +48,10 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/* %changelog +* Tue Mar 6 2001 François Pons <fpons@mandrakesoft.com> 0.2.3-5mdk +- added support for SHARE_PATH +- add BuildRequires: usbutils + * Tue Feb 13 2001 Pixel <pixel@mandrakesoft.com> 0.2.3-4mdk - fix ifree @@ -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) { @@ -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) { |