- tracker_list = get_id_tracker_list(session, tracker_type);
- if (!tracker_list) {
- return LTTNG_ERR_INVALID;
- }
- /* Save list for restore on error. */
- ret = lttng_tracker_id_get_list(tracker_list, &saved_ids);
- if (ret != LTTNG_OK) {
- return LTTNG_ERR_INVALID;
- }
- /* Remove from list. */
- ret = lttng_tracker_list_remove(tracker_list, id);
- if (ret != LTTNG_OK) {
- goto end;
- }
-
- switch (tracker_type) {
- case LTTNG_TRACKER_PID:
- DBG("Kernel untrack PID %d for session id %" PRIu64 ".", value,
- session->id);
- ret = kernctl_untrack_pid(session->fd, value);
- if (!ret) {
- ret = LTTNG_OK;
- goto end;
- }
- break;
- case LTTNG_TRACKER_VPID:
- DBG("Kernel untrack VPID %d for session id %" PRIu64 ".", value,
- session->id);
- ret = kernctl_untrack_id(
- session->fd, LTTNG_TRACKER_VPID, value);
- if (!ret) {
- ret = LTTNG_OK;
- goto end;
- }
- break;
- case LTTNG_TRACKER_UID:
- DBG("Kernel untrack UID %d for session id %" PRIu64 ".", value,
- session->id);
- ret = kernctl_untrack_id(session->fd, LTTNG_TRACKER_UID, value);
- if (!ret) {
- ret = LTTNG_OK;
- goto end;
- }
- break;
- case LTTNG_TRACKER_GID:
- DBG("Kernel untrack GID %d for session id %" PRIu64 ".", value,
- session->id);
- ret = kernctl_untrack_id(session->fd, LTTNG_TRACKER_GID, value);
- if (!ret) {
- ret = LTTNG_OK;
- goto end;
- }
+ /*
+ * Convert process attribute tracker value to the integral
+ * representation required by the kern-ctl API.
+ */
+ switch (process_attr) {
+ case LTTNG_PROCESS_ATTR_PROCESS_ID:
+ case LTTNG_PROCESS_ATTR_VIRTUAL_PROCESS_ID:
+ integral_value = (int) value->value.pid;