Adapt kernel module matching for Linux 6.6+
This MR addresses #20347. The reasoning for the changes is the following:
- If we are matching the module's name, then changing
"${NAME}.ko"
to"${NAME}.ko"*
is very unlikely to overmatch, and it matches both the.ko
and.ko.xz
extensions. - If only matching the
.ko
ending as-name "*.ko"
usingfind
, then-name "*.ko*"
might overmatch, so we use-name "*.ko" -or -name "*.ko.xz"
instead. -
basename "$1" .ko
does not accept globs or similar in itsSUFFIX
(2nd) argument AFAICS, so we usebasename | sed
instead.
As mentioned in #20347, grep
ping for .ko
does not return other files where the modules' extension (and thus compression) is used explicitly, so I think this MR enough to close the issue. For completeness, I also checked that .ko
does not appear in the wiki, translations or submodules.