Add already enabled UST event error code
authorDavid Goulet <dgoulet@efficios.com>
Thu, 22 Nov 2012 16:54:50 +0000 (11:54 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 22 Nov 2012 17:03:54 +0000 (12:03 -0500)
Return this error if the event is already enabled when found during an
enable event command.

Signed-off-by: David Goulet <dgoulet@efficios.com>
include/lttng/lttng-error.h
src/bin/lttng-sessiond/event.c
src/common/error.c

index 26f05ab4a73bd4a9b4e3036ae0d9842a8c8ab719..9cb74a12237d82298a4caf0b78f22b01510036e3 100644 (file)
@@ -75,7 +75,7 @@ enum lttng_error_code {
        /* 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 */
index 402a386ceff788be501386df7bc155c40203e62e..0fec563ad63c41c9db8e063fe98b87dbcde5b129 100644 (file)
@@ -429,7 +429,7 @@ int event_ust_enable_tracepoint(struct ltt_ust_session *usess, int domain,
 
        if (uevent->enabled) {
                /* It's already enabled so everything is OK */
-               ret = LTTNG_OK;
+               ret = LTTNG_ERR_UST_EVENT_ENABLED;
                goto end;
        }
 
index 0a3b5b3e11b83050e3d9e6bf794dfe0e393badc0..e73cf17f6991f305e3dda64a873751dd37dd47fc 100644 (file)
@@ -101,6 +101,7 @@ static const char *error_string_array[] = {
        [ 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"
This page took 0.035463 seconds and 4 git commands to generate.