kmod: remove .alias config files for modprobe.d

The use of .alias (alongside .conf) was added for compatibility with the
original module-init-tools project and has been living in kmod ever
since.

In practise, all the linux distributions that I can see are using .conf
files alone, as instructed by modprobe.d(5) and the only instance of an
.alias file is the modules.alias as shipped in the kernel.

The latter is already handled by other parts of the kmod project, so
let's enforce what our documentation says.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20240717-rm-alias-v1-1-58874caf343a@gmail.com
This commit is contained in:
Emil Velikov 2024-07-17 18:26:45 +01:00 committed by Lucas De Marchi
parent 91e4ea5a50
commit 29cc8c2e70

View File

@ -940,8 +940,7 @@ static bool conf_files_filter_out(struct kmod_ctx *ctx, DIR *d,
if (fn[0] == '.')
return true;
if (len < 6 || (!streq(&fn[len - 5], ".conf")
&& !streq(&fn[len - 6], ".alias")))
if (len < 6 || !streq(&fn[len - 5], ".conf"))
return true;
fstatat(dirfd(d), fn, &st, 0);