Author: wulf
Date: Sat Oct 31 22:04:13 2020
New Revision: 367237
URL: https://svnweb.freebsd.org/changeset/base/367237

Log:
  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

Modified:
  head/sbin/devmatch/devmatch.c

Modified: head/sbin/devmatch/devmatch.c
==============================================================================
--- head/sbin/devmatch/devmatch.c       Sat Oct 31 21:53:23 2020        
(r367236)
+++ head/sbin/devmatch/devmatch.c       Sat Oct 31 22:04:13 2020        
(r367237)
@@ -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;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to