From: Emil Velikov Date: Wed, 17 Jul 2024 17:26:45 +0000 (+0100) Subject: kmod: remove .alias config files for modprobe.d X-Git-Tag: v33~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=29cc8c2e700db317e26be02c64b4ba288ed21607;p=thirdparty%2Fkmod.git 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 Reviewed-by: Lucas De Marchi Link: https://lore.kernel.org/r/20240717-rm-alias-v1-1-58874caf343a@gmail.com --- diff --git a/libkmod/libkmod-config.c b/libkmod/libkmod-config.c index a571b6bc..fb28ed97 100644 --- a/libkmod/libkmod-config.c +++ b/libkmod/libkmod-config.c @@ -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);