sessiond: log error message when libkmod operations fail
[lttng-tools.git] / src / bin / lttng-sessiond / modprobe.cpp
index ac9f14257c6c5334a38be31e494d98fd6e619656..547756de9413d864eb908b351ec9d777c2702364 100644 (file)
@@ -393,11 +393,11 @@ static int modprobe_lttng(struct kern_modules_param *modules, int entries)
                        ret = 0;
                } else if (ret < 0) {
                        if (modules[i].load_policy == KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED) {
-                               ERR("Unable to load required module %s", modules[i].name);
+                               PERROR("Unable to load required module `%s`", modules[i].name)
                                goto error;
                        } else {
-                               DBG("Unable to load optional module %s; continuing",
-                                   modules[i].name);
+                               PERROR("Unable to load optional module `%s`; continuing",
+                                      modules[i].name);
                                ret = 0;
                        }
                } else {
@@ -491,7 +491,7 @@ static void modprobe_remove_lttng(const struct kern_modules_param *modules, int
                        DBG("Module %s is not in kernel.", modules[i].name);
                } else if (modules[i].load_policy == KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED &&
                           ret < 0) {
-                       ERR("Unable to remove module %s", modules[i].name);
+                       PERROR("Unable to remove module `%s`", modules[i].name);
                } else {
                        DBG("Modprobe removal successful %s", modules[i].name);
                }
This page took 0.02358 seconds and 4 git commands to generate.