summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2002-10-07 09:21:14 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2002-10-07 09:21:14 +0000
commitab4435235ae95cbbcd4a60e273a38d520eaa0244 (patch)
tree011733625fc97205e4f7fad68f15d08e6ad39806
parent932ec56ec6d7209823354bace1e951ee99d3bf7c (diff)
downloadldetect-ab4435235ae95cbbcd4a60e273a38d520eaa0244.tar
ldetect-ab4435235ae95cbbcd4a60e273a38d520eaa0244.tar.gz
ldetect-ab4435235ae95cbbcd4a60e273a38d520eaa0244.tar.bz2
ldetect-ab4435235ae95cbbcd4a60e273a38d520eaa0244.tar.xz
ldetect-ab4435235ae95cbbcd4a60e273a38d520eaa0244.zip
- remove gc hack that tried to fix my bug
(which i fixed in last commit) - simplify subids match; explay why we can only test for nb==4
-rw-r--r--pciusb.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/pciusb.c b/pciusb.c
index 6211dba..6fb04e0 100644
--- a/pciusb.c
+++ b/pciusb.c
@@ -107,9 +107,6 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciu
continue; // skip since already found with sub ids
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);
@@ -128,8 +125,9 @@ extern int pciusb_find_modules(struct pciusb_entries *entries, const char *fpciu
ifree(e->text); /* usb.c set it so that we display something when usbtable doesn't refer that hw*/
e->text = strndup(q+2, strlen(q)-4);
- if (e->subvendor != 0xffff && e->subdevice != 0xffff &&
- subdevice == e->subdevice && subvendor == e->subvendor)
+ /* if subids read on pcitable line, we know that subids matches :
+ (see "subids differ" test above) */
+ if (nb==4)
e->already_found = 1;
}
}