X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftrace-ust.c;h=9c7cfb690221f11778196bb83fa98209162c4091;hb=df0f840ba686e3fe670c9906fd46330fff65da07;hp=236e7685b5900cf14362af6a1e8202911604f28b;hpb=300b8fd5c7921b094f69847164ff58d889f11be6;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/trace-ust.c b/src/bin/lttng-sessiond/trace-ust.c index 236e7685b..9c7cfb690 100644 --- a/src/bin/lttng-sessiond/trace-ust.c +++ b/src/bin/lttng-sessiond/trace-ust.c @@ -139,7 +139,7 @@ struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *chan, luc = zmalloc(sizeof(struct ltt_ust_channel)); if (luc == NULL) { - perror("ltt_ust_channel zmalloc"); + PERROR("ltt_ust_channel zmalloc"); goto error; } @@ -171,7 +171,7 @@ struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *chan, /* Set trace output path */ ret = snprintf(luc->pathname, PATH_MAX, "%s", path); if (ret < 0) { - perror("asprintf ust create channel"); + PERROR("asprintf ust create channel"); goto error_free_channel; } @@ -225,20 +225,21 @@ struct ltt_ust_event *trace_ust_create_event(struct lttng_event *ev) switch (ev->loglevel_type) { case LTTNG_EVENT_LOGLEVEL_ALL: lue->attr.loglevel_type = LTTNG_UST_LOGLEVEL_ALL; + lue->attr.loglevel = -1; /* Force to -1 */ break; case LTTNG_EVENT_LOGLEVEL_RANGE: lue->attr.loglevel_type = LTTNG_UST_LOGLEVEL_RANGE; + lue->attr.loglevel = ev->loglevel; break; case LTTNG_EVENT_LOGLEVEL_SINGLE: lue->attr.loglevel_type = LTTNG_UST_LOGLEVEL_SINGLE; + lue->attr.loglevel = ev->loglevel; break; default: - ERR("Unknown ust loglevel type (%d)", ev->type); + ERR("Unknown ust loglevel type (%d)", ev->loglevel_type); goto error_free_event; } - /* Copy loglevel */ - lue->attr.loglevel = ev->loglevel; /* Init node */ lttng_ht_node_init_str(&lue->node, lue->attr.name); @@ -269,7 +270,7 @@ struct ltt_ust_metadata *trace_ust_create_metadata(char *path) lum = zmalloc(sizeof(struct ltt_ust_metadata)); if (lum == NULL) { - perror("ust metadata zmalloc"); + PERROR("ust metadata zmalloc"); goto error; } @@ -285,7 +286,7 @@ struct ltt_ust_metadata *trace_ust_create_metadata(char *path) /* Set metadata trace path */ ret = snprintf(lum->pathname, PATH_MAX, "%s/metadata", path); if (ret < 0) { - perror("asprintf ust metadata"); + PERROR("asprintf ust metadata"); goto error_free_metadata; }