Date: Sat, 14 Nov 2020 11:51:37 +0000 (UTC) From: Vladimir Kondratyev <wulf@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r367676 - stable/12/sbin/devmatch Message-ID: <202011141151.0AEBpb7b067754@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: wulf Date: Sat Nov 14 11:51:37 2020 New Revision: 367676 URL: https://svnweb.freebsd.org/changeset/base/367676 Log: MFC r367237: devmatch(8): Respect mask field when matching strings of Z type. While here, add debug output for this action. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D26823 Modified: stable/12/sbin/devmatch/devmatch.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/devmatch/devmatch.c ============================================================================== --- stable/12/sbin/devmatch/devmatch.c Sat Nov 14 11:48:28 2020 (r367675) +++ stable/12/sbin/devmatch/devmatch.c Sat Nov 14 11:51:37 2020 (r367676) @@ -349,7 +349,12 @@ search_hints(const char *bus, const char *dev, const c } 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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011141151.0AEBpb7b067754>