Improve devmatch driver loading
Use devctl freeze / thaw to allow us to laod multiple modules before doing the probe/attach so they all get a bite at the apple. Differential Revision: https://reviews.freebsd.org/D16735
This commit is contained in:
parent
485cde8df8
commit
2789a8f0cb
@ -44,9 +44,9 @@ devmatch_start()
|
||||
local x
|
||||
|
||||
if [ -n "$one_nomatch" ]; then
|
||||
x=$(devmatch -p "${one_nomatch}")
|
||||
x=$(devmatch -p "${one_nomatch}" | sort -u)
|
||||
else
|
||||
x=$(devmatch)
|
||||
x=$(devmatch | sort -u)
|
||||
fi
|
||||
|
||||
[ -n "$x" ] || return
|
||||
@ -57,10 +57,12 @@ devmatch_start()
|
||||
# We also optimize against the false positives
|
||||
# or drivers that have symbolic links that
|
||||
# confuse devmatch by running it -n.
|
||||
devctl freeze
|
||||
for m in ${x}; do
|
||||
echo "Autoloading module: ${m}"
|
||||
kldload -n ${m}
|
||||
done
|
||||
devctl thaw
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
Loading…
x
Reference in New Issue
Block a user