Return this error if the event is already enabled when found during an
enable event command.
Signed-off-by: David Goulet <dgoulet@efficios.com>
/* 52 */
LTTNG_ERR_KERN_LIST_FAIL = 53, /* Kernel listing events failed */
LTTNG_ERR_UST_CALIBRATE_FAIL = 54, /* UST calibration failed */
- /* 55 */
+ LTTNG_ERR_UST_EVENT_ENABLED = 55, /* UST event already enabled. */
LTTNG_ERR_UST_SESS_FAIL = 56, /* UST create session failed */
LTTNG_ERR_UST_CHAN_EXIST = 57, /* UST channel already exist */
LTTNG_ERR_UST_CHAN_FAIL = 58, /* UST create channel failed */
if (uevent->enabled) {
/* It's already enabled so everything is OK */
- ret = LTTNG_OK;
+ ret = LTTNG_ERR_UST_EVENT_ENABLED;
goto end;
}
[ ERROR_INDEX(LTTNG_ERR_NO_SESSIOND) ] = "No session daemon is available",
[ ERROR_INDEX(LTTNG_ERR_SESSION_STARTED) ] = "Session is running",
[ ERROR_INDEX(LTTNG_ERR_NOT_SUPPORTED) ] = "Operation not supported",
+ [ ERROR_INDEX(LTTNG_ERR_UST_EVENT_ENABLED) ] = "UST event already enabled",
/* Last element */
[ ERROR_INDEX(LTTNG_ERR_NR) ] = "Unknown error code"