svn commit: r329458 - head/sbin/devmatch
Hans Petter Selasky
hps at selasky.org
Sat Feb 17 15:07:04 UTC 2018
On 02/17/18 15:56, Warner Losh wrote:
> The right fix there, I think, is to load them all at once, in one kldload
> operation and not loop in /etc/rc.d/devmatch.
Each driver will invoke the driver loaded device method, so this will
race aswell!
You have a point. But, that means devmatch should read ahead the nomatch
events until the end, to make sure the correct driver is loaded.
For example if first a driver is loaded for a generic device, uhid, then
comes a long a ums device, we have a problem this way.
Matching should then understand how to reduce the hints, maybe by
stripping down the "mask" from least significant bit.
It is then important that the order from devmatch is not messed up by
"sort -u".
BTW: The "sort" utility lives in usr/bin and is not suitable for
/etc/rc.d/devmatch, like already pointed out.
--HPS
More information about the svn-src-head
mailing list