usess = session->ust_session;
if (session->enabled) {
- ret = LTTCOMM_UST_START_FAIL;
+ /* Already started. */
+ ret = LTTCOMM_TRACE_ALREADY_STARTED;
goto error;
}
usess = session->ust_session;
if (!session->enabled) {
- ret = LTTCOMM_UST_STOP_FAIL;
+ ret = LTTCOMM_TRACE_ALREADY_STOPPED;
goto error;
}
[ LTTCOMM_ERR_INDEX(LTTCOMM_UST_EVENT_NOT_FOUND)] = "UST event not found",
[ LTTCOMM_ERR_INDEX(LTTCOMM_UST_CONTEXT_EXIST)] = "UST context already exist",
[ LTTCOMM_ERR_INDEX(LTTCOMM_UST_CONTEXT_INVAL)] = "UST invalid context",
+ [ LTTCOMM_ERR_INDEX(LTTCOMM_NEED_ROOT_SESSIOND) ] = "A root lttng-sessiond needs to be running, and client user part of the \"tracing\" group, to interact with kernel tracing",
+ [ LTTCOMM_ERR_INDEX(LTTCOMM_TRACE_ALREADY_STARTED) ] = "Tracing already started",
+ [ LTTCOMM_ERR_INDEX(LTTCOMM_TRACE_ALREADY_STOPPED) ] = "Tracing already stopped",
+
[ LTTCOMM_ERR_INDEX(CONSUMERD_COMMAND_SOCK_READY) ] = "consumerd command socket ready",
[ LTTCOMM_ERR_INDEX(CONSUMERD_SUCCESS_RECV_FD) ] = "consumerd success on receiving fds",
[ LTTCOMM_ERR_INDEX(CONSUMERD_ERROR_RECV_FD) ] = "consumerd error on receiving fds",
[ LTTCOMM_ERR_INDEX(CONSUMERD_SPLICE_ENOMEM) ] = "consumerd splice ENOMEM",
[ LTTCOMM_ERR_INDEX(CONSUMERD_SPLICE_ESPIPE) ] = "consumerd splice ESPIPE",
[ LTTCOMM_ERR_INDEX(LTTCOMM_NO_EVENT) ] = "Event not found",
- [ LTTCOMM_ERR_INDEX(LTTCOMM_NEED_ROOT_SESSIOND) ] = "A root lttng-sessiond needs to be running, and client user part of the \"tracing\" group, to interact with kernel tracing",
};
/*
LTTCOMM_UST_EVENT_NOT_FOUND, /* UST event not found */
LTTCOMM_UST_CONTEXT_EXIST, /* UST context exist */
LTTCOMM_UST_CONTEXT_INVAL, /* UST context invalid */
+ LTTCOMM_NEED_ROOT_SESSIOND, /* root sessiond is needed */
+ LTTCOMM_TRACE_ALREADY_STARTED, /* Tracing already started */
+ LTTCOMM_TRACE_ALREADY_STOPPED, /* Tracing already stopped */
CONSUMERD_COMMAND_SOCK_READY, /* when consumerd command socket ready */
CONSUMERD_SUCCESS_RECV_FD, /* success on receiving fds */
CONSUMERD_SPLICE_EINVAL, /* EINVAL from splice(2) */
CONSUMERD_SPLICE_ENOMEM, /* ENOMEM from splice(2) */
CONSUMERD_SPLICE_ESPIPE, /* ESPIPE from splice(2) */
- LTTCOMM_NEED_ROOT_SESSIOND, /* root sessiond is needed */
+
/* MUST be last element */
LTTCOMM_NR, /* Last element */
};