From: Michael Jeanson Date: Fri, 12 Feb 2016 21:31:48 +0000 (-0500) Subject: Add builtin modules support to kmod modprobe X-Git-Tag: v2.8.0-rc1~63 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=0b1e16b80fae6103cce51a647cff0edb9786f5b6;p=lttng-tools.git Add builtin modules support to kmod modprobe Report success when loading a module that is built in the kernel. Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/modprobe.c b/src/bin/lttng-sessiond/modprobe.c index 3e41f5c1b..ca0467eb3 100644 --- a/src/bin/lttng-sessiond/modprobe.c +++ b/src/bin/lttng-sessiond/modprobe.c @@ -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);