HomeFreeBSD

devmatch: don't announce autoloading so much

Description

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

Details

Provenance
impAuthored on Jul 8 2021, 7:53 PM
Parents
rGb29ebb9c65b3: devmatch: Be tolerant of .ko being present.
Branches
Unknown
Tags
Unknown