diff --git a/sbin/devmatch/devmatch.c b/sbin/devmatch/devmatch.c index d5d698576076..c1ed11f6e41f 100644 --- a/sbin/devmatch/devmatch.c +++ b/sbin/devmatch/devmatch.c @@ -349,7 +349,12 @@ search_hints(const char *bus, const char *dev, const char *pnpinfo) } if (*cp == 'D') break; + if (bit >= 0 && ((1 << bit) & mask) == 0) + break; s = pnpval_as_str(cp + 2, pnpinfo); + if (verbose_flag) + printf("Matching %s (%c) table=%s tomatch=%s\n", + cp + 2, *cp, s, val1); if (strcmp(s, val1) != 0) notme++; break;