#include "traceable-app.h"
#include "lttng-kconsumerd.h"
#include "libustctl.h"
+#include "utils.h"
/*
* TODO:
/* 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;
}
}
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_CHANNEL_OUTPUT;
+ chan->attr.output = DEFAULT_KERNEL_CHANNEL_OUTPUT;
error:
return chan;