X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Ffilter.c;h=0b7ce6e6e9bb6df8500683caf2001d2e0f07b3c1;hb=caeac5c38e34c5282a0646a697acaa1fea22ddb7;hp=eb375c49022d4e3e7b347befda47de3e0a318b08;hpb=b9ca9147b2c75638136e65019af342e928e11c06;p=pciutils.git diff --git a/lib/filter.c b/lib/filter.c index eb375c4..0b7ce6e 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -90,14 +90,14 @@ pci_filter_parse_id(struct pci_filter *f, char *str) if (str[0] && strcmp(str, "*")) { long int x = strtol(str, &e, 16); - if ((e && *e) || (x < 0 || x >= 0xffff)) + if ((e && *e) || (x < 0 || x > 0xffff)) return "Invalid vendor ID"; f->vendor = x; } if (s[0] && strcmp(s, "*")) { long int x = strtol(s, &e, 16); - if ((e && *e) || (x < 0 || x >= 0xffff)) + if ((e && *e) || (x < 0 || x > 0xffff)) return "Invalid device ID"; f->device = x; } @@ -114,7 +114,7 @@ pci_filter_match(struct pci_filter *f, struct pci_dev *d) return 0; if (f->device >= 0 || f->vendor >= 0) { - pci_fill_info(d, PCI_FILL_IDENT); + pci_fill_info_v31(d, PCI_FILL_IDENT); if ((f->device >= 0 && f->device != d->device_id) || (f->vendor >= 0 && f->vendor != d->vendor_id)) return 0;