event-rule: tracepoint: set default pattern to '*'
[lttng-tools.git] / src / common / event-rule / tracepoint.c
index c8111a3725b5f236da76dab52117b3646a2cee71..93de1e98ce936c28ffe1dfb6a634595e51b8353b 100644 (file)
@@ -640,6 +640,7 @@ struct lttng_event_rule *lttng_event_rule_tracepoint_create(
 {
        struct lttng_event_rule *rule = NULL;
        struct lttng_event_rule_tracepoint *tp_rule;
+       enum lttng_event_rule_status status;
 
        if (domain_type == LTTNG_DOMAIN_NONE) {
                goto end;
@@ -673,6 +674,14 @@ struct lttng_event_rule *lttng_event_rule_tracepoint_create(
 
        lttng_dynamic_pointer_array_init(&tp_rule->exclusions,
                        destroy_lttng_exclusions_element);
+
+       /* Default pattern is '*'. */
+       status = lttng_event_rule_tracepoint_set_pattern(rule, "*");
+       if (status != LTTNG_EVENT_RULE_STATUS_OK) {
+               lttng_event_rule_destroy(rule);
+               rule = NULL;
+       }
+
 end:
        return rule;
 }
This page took 0.03121 seconds and 4 git commands to generate.