event-rule: userspace probe: force location on create
[lttng-tools.git] / src / bin / lttng / commands / add_trigger.c
index 092f3c8e2dd3991d03b97ad498a1f5909af3029b..776e24470aabdb78607ad9ffa4fb9fe01c0ea782 100644 (file)
@@ -994,22 +994,14 @@ 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_event_name(
-                                               res.er, tracepoint_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'.",
                                        tracepoint_name);
This page took 0.023128 seconds and 4 git commands to generate.