sessiond: lttng: Add command to check kernel tracer status
[lttng-tools.git] / src / bin / lttng-sessiond / modprobe.cpp
index 547756de9413d864eb908b351ec9d777c2702364..0b274c9a3fae6e4986f4704c9bdc5e7c4ba221f7 100644 (file)
@@ -540,6 +540,10 @@ static int modprobe_lttng(struct kern_modules_param *modules, int entries)
                } else if (WEXITSTATUS(ret) != 0) {
                        if (modules[i].load_policy == KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED) {
                                ERR("Unable to load required module %s", modules[i].name);
+                               /* Force negative return code */
+                               if (ret > 0) {
+                                       ret = -ret;
+                               }
                                goto error;
                        } else {
                                DBG("Unable to load optional module %s; continuing",
This page took 0.023862 seconds and 4 git commands to generate.