summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-07-31 13:36:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-07-31 13:36:49 +0000
commita9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc (patch)
tree2f077b51257a87c3139eb94a71a46fba08defd05
parentddf404afa8a0ccd0694cc5e60d9ace07d712b68b (diff)
downloadldetect-a9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc.tar
ldetect-a9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc.tar.gz
ldetect-a9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc.tar.bz2
ldetect-a9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc.tar.xz
ldetect-a9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc.zip
- detect ohci1394 & ehci-hcd based on the pci class
(as done in RedHat's kudzu)
-rw-r--r--ldetect.spec6
-rw-r--r--pci.c15
2 files changed, 18 insertions, 3 deletions
diff --git a/ldetect.spec b/ldetect.spec
index 399c720..5003955 100644
--- a/ldetect.spec
+++ b/ldetect.spec
@@ -1,6 +1,6 @@
Name: ldetect
Version: 0.4.9
-Release: 1mdk
+Release: 2mdk
Summary: Light hardware detection library
Source: %name.tar.bz2
Group: System/Libraries
@@ -49,6 +49,10 @@ rm -rf $RPM_BUILD_ROOT
%_libdir/*
%changelog
+* Thu Jul 31 2003 Pixel <pixel@mandrakesoft.com> 0.4.9-2mdk
+- detect ohci1394 & ehci-hcd based on the pci class
+ (as done in RedHat's kudzu)
+
* Tue Apr 22 2003 Pixel <pixel@mandrakesoft.com> 0.4.9-1mdk
- Use read() instead of fread() to read from "/proc/bus/pci/%02x/%02x.%d".
Thanks a lot to Tom Cox for finding this bug:
diff --git a/pci.c b/pci.c
index ff5020f..558b9d6 100644
--- a/pci.c
+++ b/pci.c
@@ -65,8 +65,19 @@ extern struct pciusb_entries pci_probe(int probe_type) {
e->subdevice = 0xffff;
}
class_prog = buf[0x9];
- if (e->class_ == PCI_CLASS_SERIAL_USB) /* taken from kudzu's pci.c */
- e->module = strdup(class_prog == 0 ? "usb-uhci" : "usb-ohci");
+ if (e->class_ == PCI_CLASS_SERIAL_USB) {
+ /* taken from kudzu's pci.c */
+ char *module =
+ class_prog == 0 ? "usb-uhci" :
+ class_prog == 0x10 ? "usb-ohci" :
+ class_prog == 0x20 ? "ehci-hcd" : NULL;
+ if (module) e->module = strdup(module);
+ }
+ if (e->class_ == PCI_CLASS_SERIAL_FIREWIRE) {
+ /* taken from kudzu's pci.c */
+ if (class_prog == 0x10) e->module = strdup("ohci1394");
+ }
+
close(devf);
}
fclose(f);