git: d67aa8bd9c5a - stable/15 - rc: Make devmatch use load_kld
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 28 Jun 2026 09:43:53 UTC
The branch stable/15 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=d67aa8bd9c5a544386bfa852135399abd6249fec
commit d67aa8bd9c5a544386bfa852135399abd6249fec
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-06-23 15:23:34 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-06-28 09:43:40 +0000
rc: Make devmatch use load_kld
The default behavior of load_kld is now robust enough for devmatch.
Switching means settings from /etc/sysctl.kld.d are now properly applied
when the corresponding modules are loaded by devmatch.
While here, reduce the amount of output produced by devmatch from one
line per module to a single line.
MFC after: 1 week
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D57707
(cherry picked from commit b9f616d031566e94e6967a2c533b8aa7f36123b9)
---
libexec/rc/rc.d/devmatch | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libexec/rc/rc.d/devmatch b/libexec/rc/rc.d/devmatch
index 7a8726de5677..6038092d9055 100755
--- a/libexec/rc/rc.d/devmatch
+++ b/libexec/rc/rc.d/devmatch
@@ -67,6 +67,7 @@ devmatch_start()
# names with .ko
devctl freeze
+ startmsg -n "Autoloading modules:"
x=$(echo "#${devmatch_blocklist:-${devmatch_blacklist}}#$(kenv -q devmatch_blocklist)#" | \
sed -e "s/ /#/g;s/\.ko#/#/g")
for m in ${list}; do
@@ -74,9 +75,10 @@ devmatch_start()
case "${x}" in
*"#${m}#"*) continue ;;
esac
- kldstat -q -n ${m} || \
- (echo "Autoloading module: ${m}"; kldload -n ${m})
+ load_kld ${m}
+ startmsg -n " ${m}"
done
+ startmsg "."
devctl thaw
}