event-rule: userspace probe: force location on create
[lttng-tools.git] / src / bin / lttng / commands / add_trigger.c
index ec629cb30750c5b81a46b7174540d10247a38264..776e24470aabdb78607ad9ffa4fb9fe01c0ea782 100644 (file)
@@ -994,20 +994,13 @@ struct parse_event_rule_res parse_event_rule(int *argc, const char ***argv)
                        goto error;
                }
 
-               res.er = lttng_event_rule_userspace_probe_create();
+               res.er = lttng_event_rule_userspace_probe_create(userspace_probe_location);
                if (!res.er) {
                        ERR("Failed to create userspace probe event rule.");
                        goto error;
                }
 
-               event_rule_status = lttng_event_rule_userspace_probe_set_location(
-                               res.er, userspace_probe_location);
-               if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
-                       ERR("Failed to set user space probe event rule's location.");
-                       goto error;
-               }
-
-               event_rule_status = lttng_event_rule_userspace_probe_set_name(
+               event_rule_status = lttng_event_rule_userspace_probe_set_event_name(
                                res.er, tracepoint_name);
                if (event_rule_status != LTTNG_EVENT_RULE_STATUS_OK) {
                        ERR("Failed to set user space probe event rule's name to '%s'.",
This page took 0.0241749999999999 seconds and 4 git commands to generate.