lttng_event_rule_syscall_emission_site_type emission_site_type);
/*
- * Set the pattern of a syscall event rule.
+ * Set the name pattern of a syscall event rule.
*
* Pattern can contain wildcard '*'. See man lttng-enable-event.
*
* Returns LTTNG_EVENT_RULE_STATUS_OK on success, LTTNG_EVENT_RULE_STATUS_INVALID
* if invalid parameters are passed.
*/
-extern enum lttng_event_rule_status lttng_event_rule_syscall_set_pattern(
+extern enum lttng_event_rule_status lttng_event_rule_syscall_set_name_pattern(
struct lttng_event_rule *rule, const char *pattern);
/*
- * Get the pattern of a syscall event rule.
+ * Get the name pattern of a syscall event rule.
*
* The caller does not assume the ownership of the returned pattern. The
* pattern shall only only be used for the duration of the event rule's
* parameter is passed, or LTTNG_EVENT_RULE_STATUS_UNSET if a pattern
* was not set prior to this call.
*/
-extern enum lttng_event_rule_status lttng_event_rule_syscall_get_pattern(
+extern enum lttng_event_rule_status lttng_event_rule_syscall_get_name_pattern(
const struct lttng_event_rule *rule, const char **pattern);
/*
case LTTNG_EVENT_RULE_TYPE_SYSCALL:
{
const enum lttng_event_rule_status status =
- lttng_event_rule_syscall_get_pattern(
+ lttng_event_rule_syscall_get_name_pattern(
rule, &name);
const enum lttng_event_rule_syscall_emission_site_type
emission_site_type =
goto error;
}
- event_rule_status = lttng_event_rule_syscall_set_pattern(
+ event_rule_status = lttng_event_rule_syscall_set_name_pattern(
res.er, name);
if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
ERR("Failed to set syscall event rule's pattern to '%s'.",
emission_site_type =
lttng_event_rule_syscall_get_emission_site_type(event_rule);
- event_rule_status = lttng_event_rule_syscall_get_pattern(
+ event_rule_status = lttng_event_rule_syscall_get_name_pattern(
event_rule, &pattern);
assert(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK);
syscall_rule->parent.hash = lttng_event_rule_syscall_hash;
/* Default pattern is '*'. */
- status = lttng_event_rule_syscall_set_pattern(rule, "*");
+ status = lttng_event_rule_syscall_set_name_pattern(rule, "*");
if (status != LTTNG_EVENT_RULE_STATUS_OK) {
lttng_event_rule_destroy(rule);
rule = NULL;
skip_filter_expression:
- status = lttng_event_rule_syscall_set_pattern(rule, pattern);
+ status = lttng_event_rule_syscall_set_name_pattern(rule, pattern);
if (status != LTTNG_EVENT_RULE_STATUS_OK) {
ERR("Failed to set event rule syscall pattern");
ret = -1;
return ret;
}
-enum lttng_event_rule_status lttng_event_rule_syscall_set_pattern(
+enum lttng_event_rule_status lttng_event_rule_syscall_set_name_pattern(
struct lttng_event_rule *rule, const char *pattern)
{
char *pattern_copy = NULL;
return status;
}
-enum lttng_event_rule_status lttng_event_rule_syscall_get_pattern(
+enum lttng_event_rule_status lttng_event_rule_syscall_get_name_pattern(
const struct lttng_event_rule *rule, const char **pattern)
{
struct lttng_event_rule_syscall *syscall;
event_rule = lttng_event_rule_syscall_create(LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY);
ok(event_rule, "syscall event rule object creation");
- event_rule_status = lttng_event_rule_syscall_set_pattern(
+ event_rule_status = lttng_event_rule_syscall_set_name_pattern(
event_rule, syscall_name);
ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
"Setting syscall event rule pattern: '%s'", syscall_name);
event_rule = lttng_event_rule_syscall_create(LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY);
ok(event_rule, "syscall event rule object creation");
- event_rule_status = lttng_event_rule_syscall_set_pattern(
+ event_rule_status = lttng_event_rule_syscall_set_name_pattern(
event_rule, syscall_name);
ok(event_rule_status == LTTNG_EVENT_RULE_STATUS_OK,
"Setting syscall event rule pattern: '%s'", syscall_name);
syscall = lttng_event_rule_syscall_create(LTTNG_EVENT_RULE_SYSCALL_EMISSION_SITE_ENTRY);
ok(syscall, "syscall object.");
- status = lttng_event_rule_syscall_set_pattern(syscall, pattern);
+ status = lttng_event_rule_syscall_set_name_pattern(syscall, pattern);
ok(status == LTTNG_EVENT_RULE_STATUS_OK, "setting pattern.");
- status = lttng_event_rule_syscall_get_pattern(syscall, &tmp);
+ status = lttng_event_rule_syscall_get_name_pattern(syscall, &tmp);
ok(status == LTTNG_EVENT_RULE_STATUS_OK, "getting pattern.");
ok(!strncmp(pattern, tmp, strlen(pattern)), "pattern is equal.");