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
5fa2979791
commit
8769858311
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338234
@ -44,9 +44,9 @@ devmatch_start()
|
|||||||
local x
|
local x
|
||||||
|
|
||||||
if [ -n "$one_nomatch" ]; then
|
if [ -n "$one_nomatch" ]; then
|
||||||
x=$(devmatch -p "${one_nomatch}")
|
x=$(devmatch -p "${one_nomatch}" | sort -u)
|
||||||
else
|
else
|
||||||
x=$(devmatch)
|
x=$(devmatch | sort -u)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -n "$x" ] || return
|
[ -n "$x" ] || return
|
||||||
@ -57,10 +57,12 @@ devmatch_start()
|
|||||||
# We also optimize against the false positives
|
# We also optimize against the false positives
|
||||||
# or drivers that have symbolic links that
|
# or drivers that have symbolic links that
|
||||||
# confuse devmatch by running it -n.
|
# confuse devmatch by running it -n.
|
||||||
|
devctl freeze
|
||||||
for m in ${x}; do
|
for m in ${x}; do
|
||||||
echo "Autoloading module: ${m}"
|
echo "Autoloading module: ${m}"
|
||||||
kldload -n ${m}
|
kldload -n ${m}
|
||||||
done
|
done
|
||||||
|
devctl thaw
|
||||||
}
|
}
|
||||||
|
|
||||||
load_rc_config $name
|
load_rc_config $name
|
||||||
|
Loading…
Reference in New Issue
Block a user