From: Mathieu Desnoyers Date: Mon, 9 Dec 2019 14:32:31 +0000 (-0500) Subject: common error: Add errors for clear feature X-Git-Tag: v2.12.0-rc1~153 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a237c7e3081ea5b1b3af384601c1b5489479ba5b;p=lttng-tools.git common error: Add errors for clear feature Signed-off-by: Mathieu Desnoyers Change-Id: Ib7f1a99e2c5535941d6d7f9479e00762ae14b6ae Signed-off-by: Jérémie Galarneau --- diff --git a/include/lttng/lttng-error.h b/include/lttng/lttng-error.h index c032d5a7d..b3d65ee15 100644 --- a/include/lttng/lttng-error.h +++ b/include/lttng/lttng-error.h @@ -176,6 +176,10 @@ enum lttng_error_code { LTTNG_ERR_FILE_CREATION_ERROR = 153, /* failed to create a file */ LTTNG_ERR_TIMER_STOP_ERROR = 154, /* failed to stop timer. */ LTTNG_ERR_ROTATION_NOT_AVAILABLE_KERNEL = 155, /* Rotation feature not supported by the kernel tracer. */ + LTTNG_ERR_CLEAR_RELAY_DISALLOWED = 156, /* LTTng-relayd peer does not allow lttng clear command. */ + LTTNG_ERR_CLEAR_NOT_AVAILABLE_RELAY = 157, /* Clearing a session is not supported by the relay daemon. */ + LTTNG_ERR_CLEAR_FAIL_CONSUMER = 158, /* Clear failure on consumer */ + LTTNG_ERR_ROTATION_AFTER_STOP_CLEAR = 159, /* Session was already cleared since it became inactive. */ /* MUST be last element */ LTTNG_ERR_NR, /* Last element */ diff --git a/src/common/error.c b/src/common/error.c index cb24584ae..a95844249 100644 --- a/src/common/error.c +++ b/src/common/error.c @@ -221,6 +221,10 @@ static const char *error_string_array[] = { [ ERROR_INDEX(LTTNG_ERR_FILE_CREATION_ERROR) ] = "Failed to create file", [ ERROR_INDEX(LTTNG_ERR_TIMER_STOP_ERROR) ] = "Failed to stop a timer", [ ERROR_INDEX(LTTNG_ERR_ROTATION_NOT_AVAILABLE_KERNEL) ] = "Rotation feature not supported by the kernel tracer.", + [ ERROR_INDEX(LTTNG_ERR_CLEAR_RELAY_DISALLOWED) ] = "Relayd daemon peer does not allow sessions to be cleared", + [ ERROR_INDEX(LTTNG_ERR_CLEAR_NOT_AVAILABLE_RELAY) ] = "Clearing a session is not supported by the relay daemon", + [ ERROR_INDEX(LTTNG_ERR_CLEAR_FAIL_CONSUMER) ] = "Consumer failed to clear the session", + [ ERROR_INDEX(LTTNG_ERR_ROTATION_AFTER_STOP_CLEAR) ] = "Session was already cleared since it became inactive", /* Last element */ [ ERROR_INDEX(LTTNG_ERR_NR) ] = "Unknown error code"