]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
devmatch: don't announce autoloading so much
authorWarner Losh <imp@FreeBSD.org>
Thu, 8 Jul 2021 19:53:18 +0000 (13:53 -0600)
committerWarner Losh <imp@FreeBSD.org>
Fri, 16 Jul 2021 17:45:11 +0000 (11:45 -0600)
commit66c5e65030ca055ada3eae1c18cbbafe8131fa86
treed18b5daf1e91c483736dd0c6d4e305e10c01b985
parent3b125a8b3174e4efa2e98d02dfbba4e3ae9e52d5
devmatch: don't announce autoloading so much

devmatch rc script would announce it was loading a module multiple
times. It used kldload -n so it really wasn't loading it that many
times, but the message is confusing. Use kldstat to see if we need to
load the module before saying we do. This fixes the vast majority of the
problems. It may be possible to race devmatch with a user invocation and
devd, though quite hard. In that case we'll announce things twice, but
still only load it once. No attempt is made to fix this.

PR: 232782
MFC After: 2 weeks
Sponsored by: Netflix
libexec/rc/rc.d/devmatch