]> 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 18:28:44 +0000 (12:28 -0600)
commit00ed9aa54bec137327e37c25fcd5d59347bbf4e6
treef06601c9bacf22f89f0e3bece7af87365b3f18d1
parenta4ce800b585ba01dc6e5787521654318906a1efd
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

(cherry picked from commit 5549c6a62f0f4fc5d7e80973b28ebcf7f556edf8)
libexec/rc/rc.d/devmatch