Fix I/O-related error values in ustctl
[lttng-ust.git] / include / lttng / ust-ctl.h
index 5f022c7102433a80161a25e5790f00d091b52b9d..11beabaadc63912f45774116c673a4f591fd82e0 100644 (file)
 
 #include <lttng/ust-abi.h>
 
+/*
+ * Error values: all the following functions return:
+ * >= 0: Success (LTTNG_UST_OK)
+ * < 0: error code.
+ */
 int ustctl_register_done(int sock);
 int ustctl_create_session(int sock);
 int ustctl_open_metadata(int sock, int session_handle,
@@ -29,8 +34,6 @@ int ustctl_open_metadata(int sock, int session_handle,
 int ustctl_create_channel(int sock, int session_handle,
                struct lttng_ust_channel_attr *chops,
                struct lttng_ust_object_data **channel_data);
-int ustctl_create_stream(int sock, struct lttng_ust_object_data *channel_data,
-               struct lttng_ust_object_data **stream_data);
 int ustctl_create_event(int sock, struct lttng_ust_event *ev,
                struct lttng_ust_object_data *channel_data,
                struct lttng_ust_object_data **event_data);
@@ -45,6 +48,15 @@ int ustctl_disable(int sock, struct lttng_ust_object_data *object);
 int ustctl_start_session(int sock, int handle);
 int ustctl_stop_session(int sock, int handle);
 
+/*
+ * Return -ENOENT if no more stream is available for creation.
+ * Return 0 on success.
+ * Return negative error value on system error.
+ * Return positive error value on UST error.
+ */
+int ustctl_create_stream(int sock, struct lttng_ust_object_data *channel_data,
+               struct lttng_ust_object_data **stream_data);
+
 /*
  * ustctl_tracepoint_list returns a tracepoint list handle, or negative
  * error value.
@@ -52,7 +64,8 @@ int ustctl_stop_session(int sock, int handle);
 int ustctl_tracepoint_list(int sock);
 /*
  * ustctl_tracepoint_list_get is used to iterate on the tp list
- * handle. End is iteration is reached when -ENOENT is returned.
+ * handle. End is iteration is reached when -LTTNG_UST_ERR_NOENT is
+ * returned.
  */
 int ustctl_tracepoint_list_get(int sock, int tp_list_handle,
                struct lttng_ust_tracepoint_iter *iter);
@@ -65,7 +78,8 @@ int ustctl_tracepoint_field_list(int sock);
 
 /*
  * ustctl_tracepoint_field_list_get is used to iterate on the tp field
- * list handle. End is iteration is reached when -ENOENT is returned.
+ * list handle. End is iteration is reached when -LTTNG_UST_ERR_NOENT is
+ * returned.
  */
 int ustctl_tracepoint_field_list_get(int sock, int tp_field_list_handle,
                struct lttng_ust_field_iter *iter);
This page took 0.02375 seconds and 4 git commands to generate.