1*aa7c028aSWarner Losh# Implement the run-time component of devmatch by reacting to nomatch events. 24420d8e1SWarner Losh 34420d8e1SWarner Losh# 4*aa7c028aSWarner Losh# Ignore those devices that can't possibly match. When there's neither a 5*aa7c028aSWarner Losh# location, nor a pnpinfo string, we know that there's nothing devmatch can 6*aa7c028aSWarner Losh# match on. When it's only a location, it'd debateable, but for nomatch 7*aa7c028aSWarner Losh# events, we can't disambiguate between the two reliably. 8*aa7c028aSWarner Losh# 9*aa7c028aSWarner Loshnomatch 101 { 10*aa7c028aSWarner Losh match "_" " +at +on .*"; 11*aa7c028aSWarner Losh}; 12*aa7c028aSWarner Losh 13*aa7c028aSWarner Losh# 14*aa7c028aSWarner Losh# Ignore ACPI devices whose _HID is none. These cannot tell us what to load, 15*aa7c028aSWarner Losh# since 'none' is not a valid id. There's no need to call devvmatch for these either. 16*aa7c028aSWarner Losh# 17*aa7c028aSWarner Loshnomatch 101 { 18*aa7c028aSWarner Losh match "_HID" "none"; 19*aa7c028aSWarner Losh match "bus" "acpi[0-9]+"; 20*aa7c028aSWarner Losh}; 21*aa7c028aSWarner Losh 224420d8e1SWarner Losh# 234420d8e1SWarner Losh# Generic NOMATCH event 24*aa7c028aSWarner Losh# 25*aa7c028aSWarner Losh# Note: It would be better to have some internal-to-devd action that will do 26*aa7c028aSWarner Losh# what devmatch does without re-parsing loader.hints for each invocation 27*aa7c028aSWarner Losh# 284420d8e1SWarner Loshnomatch 100 { 29*aa7c028aSWarner Losh action "service devmatch quietstart $*"; 304420d8e1SWarner Losh}; 318d99f31cSWarner Losh 32ff99e282SWarner Losh# Add the following to devd.conf to prevent this from running: 338d99f31cSWarner Losh# nomatch 1000 { 346bb41868SHans Petter Selasky# action "true"; 358d99f31cSWarner Losh# }; 368d99f31cSWarner Losh# it replaces the generic event with one of higher priority that 378d99f31cSWarner Losh# does nothing. You can also set 'devmatch_enable=NO' in /etc/rc.conf 38