summaryrefslogtreecommitdiffstats
path: root/pci.c
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-08-19 21:28:43 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-08-19 21:28:43 +0000
commite7459fe28ce216d744ffe305a01b78ab88a716a2 (patch)
tree8b3db97e711cea8b07d41e257163fc476a4af06a /pci.c
parenta9d8b25bd82f7bcf3de4e4c10c97cfb1eab2becc (diff)
downloadldetect-e7459fe28ce216d744ffe305a01b78ab88a716a2.tar
ldetect-e7459fe28ce216d744ffe305a01b78ab88a716a2.tar.gz
ldetect-e7459fe28ce216d744ffe305a01b78ab88a716a2.tar.bz2
ldetect-e7459fe28ce216d744ffe305a01b78ab88a716a2.tar.xz
ldetect-e7459fe28ce216d744ffe305a01b78ab88a716a2.zip
do full-probe by default; remove support for no full-probe
Diffstat (limited to 'pci.c')
-rw-r--r--pci.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/pci.c b/pci.c
index 558b9d6..e0d1d0f 100644
--- a/pci.c
+++ b/pci.c
@@ -14,7 +14,7 @@
char *proc_pci_path_default = "/proc/bus/pci/devices";
char *proc_pci_path = NULL;
-extern struct pciusb_entries pci_probe(int probe_type) {
+extern struct pciusb_entries pci_probe(void) {
FILE *f; int devf;
char buf[BUF_SIZE];
unsigned short *bufi = (unsigned short *) &buf;
@@ -49,8 +49,6 @@ extern struct pciusb_entries pci_probe(int probe_type) {
e->pci_bus = devbusfn >> 8;
e->pci_device = (devbusfn & 0xff) >> 3;
e->pci_function = (devbusfn & 0xff) & 0x07;
- if (probe_type != 1)
- continue;
snprintf(file, sizeof(file), "/proc/bus/pci/%02x/%02x.%d", e->pci_bus, e->pci_device, e->pci_function);
if ((devf = open(file, O_RDONLY)) == -1)
continue;
@@ -83,13 +81,9 @@ extern struct pciusb_entries pci_probe(int probe_type) {
fclose(f);
realloc(r.entries, sizeof(struct pciusb_entry) * r.nb);
- if (pciusb_find_modules(&r, "pcitable", probe_type))
+ if (pciusb_find_modules(&r, "pcitable"))
return r;
- /* ok, let's try again with subids */
- if (probe_type == 0)
- return pci_probe(1);
-
/* should not happen */
exit(1);
}