Fix message argument type
[lttng-tools.git] / ltt-sessiond / main.c
index e7ad6f9b140e1c48f05f2befcda5d73fc1ce2803..98738928464290a8b1406bf21be06e54c26c9b68 100644 (file)
@@ -35,7 +35,6 @@
 #include <unistd.h>
 
 #include <urcu/list.h>         /* URCU list library (-lurcu) */
-#include <ust/ustctl.h>                /* UST control lib (-lust) */
 #include <lttng/lttng.h>
 
 #include "liblttsessiondcomm.h"
@@ -46,6 +45,7 @@
 #include "session.h"
 #include "traceable-app.h"
 #include "lttng-kconsumerd.h"
+#include "libustctl.h"
 
 /*
  * TODO:
@@ -224,7 +224,7 @@ static int ust_connect_app(pid_t pid)
 
        sock = ustctl_connect_pid(lta->pid);
        if (sock < 0) {
-               ERR("Fail connecting to the PID %d\n", pid);
+               ERR("Fail connecting to the PID %d", pid);
        }
 
        return sock;
@@ -637,9 +637,11 @@ static int create_trace_dir(struct ltt_kernel_session *session)
                // TODO: recursive create dir
                ret = mkdir(chan->pathname, S_IRWXU | S_IRWXG );
                if (ret < 0) {
-                       perror("mkdir trace path");
-                       ret = -errno;
-                       goto error;
+                       if (ret != EEXIST) {
+                               perror("mkdir trace path");
+                               ret = -errno;
+                               goto error;
+                       }
                }
        }
 
@@ -1514,8 +1516,11 @@ static int set_kconsumerd_sockets(void)
 
        ret = mkdir(KCONSUMERD_PATH, S_IRWXU | S_IRWXG);
        if (ret < 0) {
-               ERR("Failed to create " KCONSUMERD_PATH);
-               goto error;
+               if (errno != EEXIST) {
+                       ERR("Failed to create " KCONSUMERD_PATH);
+                       goto error;
+               }
+               ret = 0;
        }
 
        /* Create the kconsumerd error unix socket */
This page took 0.026183 seconds and 4 git commands to generate.