struct lttng_kernel_abi_filter_bytecode __user *bytecode);
void lttng_event_enabler_destroy(struct lttng_event_enabler_common *event_enabler);
-int lttng_desc_match_enabler(const struct lttng_kernel_event_desc *desc,
+bool lttng_desc_match_enabler(const struct lttng_kernel_event_desc *desc,
struct lttng_event_enabler_common *enabler);
bool lttng_event_enabler_match_event(struct lttng_event_enabler_common *event_enabler,
struct lttng_kernel_event_common *event);
return 1;
}
-int lttng_desc_match_enabler(const struct lttng_kernel_event_desc *desc,
+static
+int lttng_desc_match_enabler_check(const struct lttng_kernel_event_desc *desc,
struct lttng_event_enabler_common *enabler)
{
const char *desc_name, *enabler_name;
}
}
+bool lttng_desc_match_enabler(const struct lttng_kernel_event_desc *desc,
+ struct lttng_event_enabler_common *enabler)
+{
+ int ret;
+
+ ret = lttng_desc_match_enabler_check(desc, enabler);
+ if (ret < 0) {
+ WARN_ON_ONCE(1);
+ return false;
+ }
+ return ret;
+}
+
bool lttng_event_enabler_match_event(struct lttng_event_enabler_common *event_enabler,
struct lttng_kernel_event_common *event)
{
/* Unknown syscall */
continue;
}
- if (lttng_desc_match_enabler(desc,
- lttng_event_recorder_enabler_as_enabler(syscall_event_enabler)) <= 0)
+ if (!lttng_desc_match_enabler(desc,
+ lttng_event_recorder_enabler_as_enabler(syscall_event_enabler)))
continue;
/*
* Check if already created.