summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-10-04 15:30:44 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-10-04 15:30:44 +0000
commit5cae06341b6d05776c898c53328c42c7bcb5791b (patch)
tree257f19463a77476f6ec3cfceaf2f76784011bbbf
parent04a0e12c560caf3990c04a779fcbabae3a94ca94 (diff)
downloadldetect-5cae06341b6d05776c898c53328c42c7bcb5791b.tar
ldetect-5cae06341b6d05776c898c53328c42c7bcb5791b.tar.gz
ldetect-5cae06341b6d05776c898c53328c42c7bcb5791b.tar.bz2
ldetect-5cae06341b6d05776c898c53328c42c7bcb5791b.tar.xz
ldetect-5cae06341b6d05776c898c53328c42c7bcb5791b.zip
try to detect correctly the module when subv/subd differ with non-subv/subd
-rw-r--r--pciusb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pciusb.c b/pciusb.c
index eda4ca6..d1deda3 100644
--- a/pciusb.c
+++ b/pciusb.c
@@ -109,6 +109,9 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciu
}
if (vendor != e->vendor || device != e->device)
continue; // main ids differ
+ if (nb < 4 && e->module)
+ continue; // already found a match and this match isn't a subid one (so it's not potentially more precise)
+
if (nb == 4 && e->subvendor == 0xffff && e->subdevice == 0xffff && !no_subid) {
pciusb_free(entries);
fh_close(&f);