From: Martin Mares Date: Tue, 26 Aug 2008 11:24:35 +0000 (+0200) Subject: Let filters accept vendor and device 0xffff. X-Git-Tag: v3.0.1~14 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=f2505ce4aac37067f644646d973eeb382d8db6ec;p=pciutils.git Let filters accept vendor and device 0xffff. Thanks to Sebastian Herbszt for a bug report. --- diff --git a/lib/filter.c b/lib/filter.c index eb375c4..2bedc95 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; }