xref: /freebsd/sbin/devd/devmatch.conf (revision aa7c028adbb48bfb5404c567d66cab313d471cfc)
1*aa7c028aSWarner Losh# Implement the run-time component of devmatch by reacting to nomatch events.
244e1285cSBrad Davis
344e1285cSBrad Davis#
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
2244e1285cSBrad Davis#
2344e1285cSBrad Davis# 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#
2844e1285cSBrad Davisnomatch 100 {
29*aa7c028aSWarner Losh	action "service devmatch quietstart $*";
3044e1285cSBrad Davis};
3144e1285cSBrad Davis
3244e1285cSBrad Davis# Add the following to devd.conf to prevent this from running:
3344e1285cSBrad Davis# 	nomatch 1000 {
3444e1285cSBrad Davis#		action "true";
3544e1285cSBrad Davis#	};
3644e1285cSBrad Davis# it replaces the generic event with one of higher priority that
3744e1285cSBrad Davis# does nothing. You can also set 'devmatch_enable=NO' in /etc/rc.conf
38