/*
* Create a newly allocated syscall event rule.
*
+ * The default pattern is '*'.
+ *
* Returns a new event rule on success, NULL on failure. This event rule must be
* destroyed using lttng_event_rule_destroy().
*/
{
struct lttng_event_rule *rule = NULL;
struct lttng_event_rule_syscall *syscall_rule;
+ enum lttng_event_rule_status status;
syscall_rule = zmalloc(sizeof(struct lttng_event_rule_syscall));
if (!syscall_rule) {
syscall_rule->parent.generate_exclusions =
lttng_event_rule_syscall_generate_exclusions;
syscall_rule->parent.hash = lttng_event_rule_syscall_hash;
+
+ /* Default pattern is '*'. */
+ status = lttng_event_rule_syscall_set_pattern(rule, "*");
+ if (status != LTTNG_EVENT_RULE_STATUS_OK) {
+ lttng_event_rule_destroy(rule);
+ rule = NULL;
+ }
+
end:
return rule;
}