]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
kmod: remove .alias config files for modprobe.d
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 17 Jul 2024 17:26:45 +0000 (18:26 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Sat, 20 Jul 2024 14:10:28 +0000 (09:10 -0500)
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
libkmod/libkmod-config.c

index a571b6bc91e1805897751e143cf1dce7bdb6349f..fb28ed978e995b26d71dbfb2aeed8eda0d57f0dd 100644 (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);