config: also parse softdeps from modules
authorTom Gundersen <teg@jklm.no>
Mon, 31 Mar 2014 13:18:51 +0000 (15:18 +0200)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 1 Apr 2014 11:13:54 +0000 (08:13 -0300)
This information can be found in /lib/modules/`uname -r`/modules.softdep, and
has only recently been exported by the kernel.

Also remove the advice about copying modules.softdep to /lib/modules as it is
not clear how to do this correctly with several kernels installed with
potentially conflicting soft dependencies.

libkmod/libkmod-config.c
tools/depmod.c

index 9905d5e..0953924 100644 (file)
@@ -848,6 +848,8 @@ int kmod_config_new(struct kmod_ctx *ctx, struct kmod_config **p_config,
        struct kmod_list *path_list = NULL;
        size_t i;
 
+       conf_files_insert_sorted(ctx, &list, kmod_get_dirname(ctx), "modules.softdep");
+
        for (i = 0; config_paths[i] != NULL; i++) {
                const char *path = config_paths[i];
                unsigned long long path_stamp = 0;
index 37e6afd..1aedaaf 100644 (file)
@@ -1952,8 +1952,6 @@ static int output_softdeps(struct depmod *depmod, FILE *out)
        size_t i;
 
        fputs("# Soft dependencies extracted from modules themselves.\n", out);
-       fputs("# Copy, with a .conf extension, to /etc/modprobe.d to use "
-             "it with modprobe.\n", out);
 
        for (i = 0; i < depmod->modules.count; i++) {
                const struct mod *mod = depmod->modules.array[i];