Cleanup: remove dead assignment
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index e282a9c7699845ae4a15e4a9216fa81f812f9020..f9f7646ca05b82ac08b27a77cc2b2e58b58ba8ce 100644 (file)
@@ -2797,6 +2797,18 @@ static int init_kernel_tracer(void)
                goto error_modules;
        }
 
+       ret = kernel_supports_ring_buffer_snapshot_sample_positions(
+                       kernel_tracer_fd);
+       if (ret < 0) {
+               goto error_modules;
+       }
+
+       if (ret < 1) {
+               WARN("Kernel tracer does not support buffer monitoring. "
+                       "The monitoring timer of channels in the kernel domain "
+                       "will be set to 0 (disabled).");
+       }
+
        DBG("Kernel tracer fd %d", kernel_tracer_fd);
        return 0;
 
@@ -5396,13 +5408,10 @@ static int set_consumer_sockets(struct consumer_data *consumer_data,
        DBG2("Creating consumer directory: %s", path);
 
        ret = mkdir(path, S_IRWXU | S_IRGRP | S_IXGRP);
-       if (ret < 0) {
-               if (errno != EEXIST) {
-                       PERROR("mkdir");
-                       ERR("Failed to create %s", path);
-                       goto error;
-               }
-               ret = -1;
+       if (ret < 0 && errno != EEXIST) {
+               PERROR("mkdir");
+               ERR("Failed to create %s", path);
+               goto error;
        }
        if (is_root) {
                ret = chown(path, 0, utils_get_group_id(tracing_group_name));
This page took 0.023655 seconds and 4 git commands to generate.