+static int handle_process_attr_status(enum lttng_process_attr process_attr,
+ enum lttng_process_attr_tracker_handle_status status)
+{
+ int ret = CMD_SUCCESS;
+
+ switch (status) {
+ case LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_INVALID_TRACKING_POLICY:
+ case LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_OK:
+ /* Carry on. */
+ break;
+ case LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_COMMUNICATION_ERROR:
+ ERR("Communication occurred while fetching %s tracker",
+ lttng_process_attr_to_string(process_attr));
+ ret = CMD_ERROR;
+ break;
+ case LTTNG_PROCESS_ATTR_TRACKER_HANDLE_STATUS_SESSION_DOES_NOT_EXIST:
+ ERR("Failed to get the inclusion set of the %s tracker: session `%s` no longer exists",
+ lttng_process_attr_to_string(process_attr),
+ the_handle->session_name);
+ ret = CMD_ERROR;
+ break;
+ default:
+ ERR("Unknown error occurred while fetching the inclusion set of the %s tracker",
+ lttng_process_attr_to_string(process_attr));
+ ret = CMD_ERROR;
+ break;
+ }
+
+ return ret;
+}
+
+static int mi_output_empty_tracker(enum lttng_process_attr process_attr)
+{
+ int ret;
+
+ ret = mi_lttng_process_attribute_tracker_open(the_writer, process_attr);
+ if (ret) {
+ goto end;
+ }
+
+ ret = mi_lttng_close_multi_element(the_writer, 2);
+end:
+ return ret;
+}
+
+static inline bool is_value_type_name(
+ enum lttng_process_attr_value_type value_type)
+{
+ return value_type == LTTNG_PROCESS_ATTR_VALUE_TYPE_USER_NAME ||
+ value_type == LTTNG_PROCESS_ATTR_VALUE_TYPE_GROUP_NAME;
+}
+