Clean-up: sessiond: prepend `the_` to global variable names
[lttng-tools.git] / src / bin / lttng-sessiond / modprobe.c
index 28385ea39e6affd19e30627b97411c8fa2817a99..f701ca5f892b684063ec1e834af807a02ae8a4cd 100644 (file)
@@ -56,6 +56,14 @@ struct kern_modules_param kern_modules_control_core[] = {
                .name = (char *) "lttng-ring-buffer-event_notifier-client",
                .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
        },
+       {
+               .name = (char *) "lttng-counter-client-percpu-64-modular",
+               .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+       },
+       {
+               .name = (char *) "lttng-counter-client-percpu-32-modular",
+               .load_policy = KERNEL_MODULE_PROPERTY_LOAD_POLICY_OPTIONAL,
+       },
 };
 
 /* LTTng kerneltracer probe modules list */
@@ -506,14 +514,23 @@ static void modprobe_remove_lttng(const struct kern_modules_param *modules,
                modprobe[sizeof(modprobe) - 1] = '\0';
                ret = system(modprobe);
                if (ret == -1) {
-                       ERR("Unable to launch modprobe -r for module %s",
-                                       modules[i].name);
-               } else if (modules[i].load_policy == KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED && WEXITSTATUS(ret) != 0) {
-                       ERR("Unable to remove module %s",
-                                       modules[i].name);
+                       if (modules[i].load_policy == KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED) {
+                               ERR("Unable to launch modprobe -r for required module %s",
+                                               modules[i].name);
+                       } else {
+                               DBG("Unable to launch modprobe -r for optional module %s",
+                                               modules[i].name);
+                       }
+               } else if (WEXITSTATUS(ret) != 0) {
+                       if (modules[i].load_policy == KERNEL_MODULE_PROPERTY_LOAD_POLICY_REQUIRED) {
+                               ERR("Unable to remove required module %s",
+                                               modules[i].name);
+                       } else {
+                               DBG("Unable to remove optional module %s",
+                                               modules[i].name);
+                       }
                } else {
-                       DBG("Modprobe removal successful %s",
-                                       modules[i].name);
+                       DBG("Modprobe removal successful %s", modules[i].name);
                }
        }
 }
@@ -701,7 +718,7 @@ int modprobe_lttng_data(void)
         * Base probes: either from command line option, environment
         * variable or default list.
         */
-       list = config.kmod_probes_list.value;
+       list = the_config.kmod_probes_list.value;
        if (list) {
                /* User-specified probes. */
                ret = append_list_to_probes(list);
@@ -737,7 +754,7 @@ int modprobe_lttng_data(void)
        /*
         * Extra modules? Append them to current probes list.
         */
-       list = config.kmod_extra_probes_list.value;
+       list = the_config.kmod_extra_probes_list.value;
        if (list) {
                ret = append_list_to_probes(list);
                if (ret) {
This page took 0.024841 seconds and 4 git commands to generate.