X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-abi.c;h=d146e1023efda3c70ee21db5be17a61d63070dc5;hb=cbef69018acdeb52d27529e80126b43f3733e233;hp=e6ffa41f071e2f50a40ab826ab577ba2674ca4bf;hpb=20d630cf340f4a14f4d3340f50143ef551643a83;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c index e6ffa41f..d146e102 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -510,7 +510,7 @@ static const struct lttng_ust_objd_ops lttng_session_ops = { */ static void ltt_tracepoint_list_get(struct ltt_tracepoint_list *list, - char *tp_list_entry) + struct lttng_ust_tracepoint_iter *tracepoint) { next: if (!list->got_first) { @@ -521,13 +521,27 @@ next: tracepoint_iter_next(&list->iter); copy: if (!list->iter.tracepoint) { - tp_list_entry[0] = '\0'; /* end of list */ + tracepoint->name[0] = '\0'; /* end of list */ } else { if (!strcmp((*list->iter.tracepoint)->name, "lttng_ust:metadata")) goto next; - memcpy(tp_list_entry, (*list->iter.tracepoint)->name, + memcpy(tracepoint->name, (*list->iter.tracepoint)->name, LTTNG_UST_SYM_NAME_LEN); +#if 0 + if ((*list->iter.tracepoint)->loglevel) { + memcpy(tracepoint->loglevel, + (*list->iter.tracepoint)->loglevel->identifier, + LTTNG_UST_SYM_NAME_LEN); + tracepoint->loglevel_value = + (*list->iter.tracepoint)->loglevel->value; + } else { +#endif + tracepoint->loglevel[0] = '\0'; + tracepoint->loglevel_value = 0; +#if 0 + } +#endif } } @@ -535,12 +549,13 @@ static long lttng_tracepoint_list_cmd(int objd, unsigned int cmd, unsigned long arg) { struct ltt_tracepoint_list *list = objd_private(objd); - char *str = (char *) arg; + struct lttng_ust_tracepoint_iter *tp = + (struct lttng_ust_tracepoint_iter *) arg; switch (cmd) { case LTTNG_UST_TRACEPOINT_LIST_GET: - ltt_tracepoint_list_get(list, str); - if (str[0] == '\0') + ltt_tracepoint_list_get(list, tp); + if (tp->name[0] == '\0') return -ENOENT; return 0; default: