Rename `enum lttng_enabler_type` to `_format_type`
[lttng-ust.git] / liblttng-ust / lttng-events.c
index cbed800bee95ef4bfb9b1ec4fbad3533618c30b7..527aa69ce4cc256defe582b971e5ea79ceb9f4b3 100644 (file)
@@ -20,7 +20,6 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#define _GNU_SOURCE
 #define _LGPL_SOURCE
 #include <stdio.h>
 #include <urcu/list.h>
@@ -632,7 +631,7 @@ int lttng_desc_match_star_glob_enabler(const struct lttng_event_desc *desc,
        int loglevel = 0;
        unsigned int has_loglevel = 0;
 
-       assert(enabler->type == LTTNG_ENABLER_STAR_GLOB);
+       assert(enabler->format_type == LTTNG_ENABLER_FORMAT_STAR_GLOB);
        if (!strutils_star_glob_match(enabler->event_param.name, SIZE_MAX,
                        desc->name, SIZE_MAX))
                return 0;
@@ -655,7 +654,7 @@ int lttng_desc_match_event_enabler(const struct lttng_event_desc *desc,
        int loglevel = 0;
        unsigned int has_loglevel = 0;
 
-       assert(enabler->type == LTTNG_ENABLER_EVENT);
+       assert(enabler->format_type == LTTNG_ENABLER_FORMAT_EVENT);
        if (strcmp(desc->name, enabler->event_param.name))
                return 0;
        if (desc->loglevel) {
@@ -674,8 +673,8 @@ static
 int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
                struct lttng_enabler *enabler)
 {
-       switch (enabler->type) {
-       case LTTNG_ENABLER_STAR_GLOB:
+       switch (enabler->format_type) {
+       case LTTNG_ENABLER_FORMAT_STAR_GLOB:
        {
                struct lttng_ust_excluder_node *excluder;
 
@@ -703,7 +702,7 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
                }
                return 1;
        }
-       case LTTNG_ENABLER_EVENT:
+       case LTTNG_ENABLER_FORMAT_EVENT:
                return lttng_desc_match_event_enabler(desc, enabler);
        default:
                return -EINVAL;
@@ -1042,7 +1041,7 @@ void lttng_ust_events_exit(void)
 /*
  * Enabler management.
  */
-struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_type type,
+struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_format_type format_type,
                struct lttng_ust_event *event_param,
                struct lttng_channel *chan)
 {
@@ -1051,7 +1050,7 @@ struct lttng_enabler *lttng_enabler_create(enum lttng_enabler_type type,
        enabler = zmalloc(sizeof(*enabler));
        if (!enabler)
                return NULL;
-       enabler->type = type;
+       enabler->format_type = format_type;
        CDS_INIT_LIST_HEAD(&enabler->filter_bytecode_head);
        CDS_INIT_LIST_HEAD(&enabler->excluder_head);
        memcpy(&enabler->event_param, event_param,
@@ -1145,6 +1144,8 @@ int lttng_attach_context(struct lttng_ust_context *context_param,
                return lttng_add_net_ns_to_ctx(ctx);
        case LTTNG_UST_CONTEXT_PID_NS:
                return lttng_add_pid_ns_to_ctx(ctx);
+       case LTTNG_UST_CONTEXT_TIME_NS:
+               return lttng_add_time_ns_to_ctx(ctx);
        case LTTNG_UST_CONTEXT_USER_NS:
                return lttng_add_user_ns_to_ctx(ctx);
        case LTTNG_UST_CONTEXT_UTS_NS:
This page took 0.024695 seconds and 4 git commands to generate.