Add builtin modules support to kmod modprobe
[lttng-tools.git] / 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.023974 seconds and 4 git commands to generate.