X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=ltt-sessiond%2Fmain.c;h=b0848eb45bb2fdb8cb4df223cf9b2e794e1a0a4b;hp=cdeb009118f37c6fe0f573d952454e145addd71f;hb=8ce37aa529d4d3cc5503605a5a4355395aeb1bd2;hpb=d65106b1011efccf8fa5f9d7c8f2dfb0de38f5e8 diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index cdeb00911..b0848eb45 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -48,6 +48,7 @@ #include "traceable-app.h" #include "lttng-kconsumerd.h" #include "libustctl.h" +#include "utils.h" /* * TODO: @@ -282,12 +283,10 @@ static int create_trace_dir(struct ltt_kernel_session *session) /* Create all channel directories */ cds_list_for_each_entry(chan, &session->channel_list.head, list) { DBG("Creating trace directory at %s", chan->pathname); - // TODO: recursive create dir - ret = mkdir(chan->pathname, S_IRWXU | S_IRWXG ); + ret = mkdir_recursive(chan->pathname, S_IRWXU | S_IRWXG ); if (ret < 0) { if (ret != EEXIST) { - perror("mkdir trace path"); - ret = -errno; + ERR("Trace directory creation error"); goto error; } } @@ -720,6 +719,7 @@ static struct lttng_channel *init_default_channel(void) chan->attr.num_subbuf = DEFAULT_CHANNEL_SUBBUF_NUM; chan->attr.switch_timer_interval = DEFAULT_CHANNEL_SWITCH_TIMER; chan->attr.read_timer_interval = DEFAULT_CHANNEL_READ_TIMER; + chan->attr.output = DEFAULT_KERNEL_CHANNEL_OUTPUT; error: return chan; @@ -1166,7 +1166,6 @@ static int process_client_msg(struct command_ctx *cmd_ctx) ret = kernel_create_event(&ev_attr, chan); if (ret < 0) { /* Ignore error here and continue */ - continue; } }