summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorVladimir Kondratyev <wulf@FreeBSD.org>2020-10-31 22:04:13 +0000
committerVladimir Kondratyev <wulf@FreeBSD.org>2020-10-31 22:04:13 +0000
commit3bdb68463337cd6bba397b21b8883b9b8885dd8a (patch)
tree1060ed620cf08c6adf3268b9dc4cd1a9a868a666 /sbin
parentc77bfaa75051254e1d1dcdc457251236aa416e93 (diff)
downloadsrc-test-3bdb68463337cd6bba397b21b8883b9b8885dd8a.tar.gz
src-test-3bdb68463337cd6bba397b21b8883b9b8885dd8a.zip
devmatch(8): Respect mask field when matching strings of Z type.
While here, add debug output for this action. Reviewed by: imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D26823
Notes
Notes: svn path=/head/; revision=367237
Diffstat (limited to 'sbin')
-rw-r--r--sbin/devmatch/devmatch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sbin/devmatch/devmatch.c b/sbin/devmatch/devmatch.c
index d5d698576076d..c1ed11f6e41f0 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;