Add builtin modules support to kmod modprobe
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 12 Feb 2016 21:31:48 +0000 (16:31 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Mar 2016 20:14:41 +0000 (16:14 -0400)
Report success when loading a module that is built in the kernel.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/modprobe.c

index 3e41f5c1b6539a9eaa3af8706700c074c473c2b9..ca0467eb37973f169cdebc7966bbb613e83285a9 100644 (file)
@@ -180,9 +180,12 @@ static int modprobe_lttng(struct kern_modules_param *modules,
                        goto error;
                }
 
-               ret = kmod_module_probe_insert_module(mod, KMOD_PROBE_IGNORE_LOADED,
+               ret = kmod_module_probe_insert_module(mod, 0,
                                NULL, NULL, NULL, NULL);
-               if (ret < 0) {
+               if (ret == -EEXIST) {
+                       DBG("Module %s is already loaded", modules[i].name);
+                       ret = 0;
+               } else if (ret < 0) {
                        if (required) {
                                ERR("Unable to load required module %s",
                                                modules[i].name);
This page took 0.028983 seconds and 5 git commands to generate.