From: Mathieu Desnoyers Date: Wed, 4 Jul 2018 20:11:17 +0000 (-0400) Subject: trackers: change error code from "pid" to "id" X-Git-Tag: v2.12.0-rc1~108 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=546699de452c27c8687a9c4e522359079ef5e4fa;p=lttng-tools.git trackers: change error code from "pid" to "id" Signed-off-by: Mathieu Desnoyers Change-Id: I0ce03b23350a9f0da9d5f00ac3c6d0e824af9a98 Signed-off-by: Jérémie Galarneau --- diff --git a/include/lttng/lttng-error.h b/include/lttng/lttng-error.h index b3d65ee15..bddd39d78 100644 --- a/include/lttng/lttng-error.h +++ b/include/lttng/lttng-error.h @@ -134,8 +134,8 @@ enum lttng_error_code { LTTNG_ERR_EXCLUSION_NOMEM = 111, /* Lack of memory while processing event exclusions */ LTTNG_ERR_INVALID_EVENT_NAME = 112, /* Invalid event name */ LTTNG_ERR_INVALID_CHANNEL_NAME = 113, /* Invalid channel name */ - LTTNG_ERR_PID_TRACKED = 114, /* PID already tracked */ - LTTNG_ERR_PID_NOT_TRACKED = 115, /* PID not tracked */ + LTTNG_ERR_ID_TRACKED = 114, /* ID already tracked */ + LTTNG_ERR_ID_NOT_TRACKED = 115, /* ID not tracked */ LTTNG_ERR_INVALID_CHANNEL_DOMAIN = 116, /* Invalid channel domain */ LTTNG_ERR_OVERFLOW = 117, /* Overflow occurred. */ LTTNG_ERR_SESSION_NOT_STARTED = 118, /* Session not started */ @@ -180,6 +180,11 @@ enum lttng_error_code { 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. */ + LTTNG_ERR_USER_NOT_FOUND = 160, /* User not found. */ + LTTNG_ERR_GROUP_NOT_FOUND = 161, /* Group not found. */ + + LTTNG_ERR_PID_TRACKED = LTTNG_ERR_ID_TRACKED, /* Backward compat alias to LTTNG_ERR_ID_TRACKED */ + LTTNG_ERR_PID_NOT_TRACKED = LTTNG_ERR_ID_NOT_TRACKED, /* Backward compat alias to LTTNG_ERR_ID_NOT_TRACKED */ /* MUST be last element */ LTTNG_ERR_NR, /* Last element */ diff --git a/src/common/error.c b/src/common/error.c index a95844249..c5ddadfa0 100644 --- a/src/common/error.c +++ b/src/common/error.c @@ -179,8 +179,8 @@ static const char *error_string_array[] = { [ ERROR_INDEX(LTTNG_ERR_MI_NOT_IMPLEMENTED) ] = "Mi feature not implemented", [ ERROR_INDEX(LTTNG_ERR_INVALID_EVENT_NAME) ] = "Invalid event name", [ ERROR_INDEX(LTTNG_ERR_INVALID_CHANNEL_NAME) ] = "Invalid channel name", - [ ERROR_INDEX(LTTNG_ERR_PID_TRACKED) ] = "PID already tracked", - [ ERROR_INDEX(LTTNG_ERR_PID_NOT_TRACKED) ] = "PID not tracked", + [ ERROR_INDEX(LTTNG_ERR_ID_TRACKED) ] = "ID already tracked", + [ ERROR_INDEX(LTTNG_ERR_ID_NOT_TRACKED) ] = "ID not tracked", [ ERROR_INDEX(LTTNG_ERR_INVALID_CHANNEL_DOMAIN) ] = "Invalid channel domain", [ ERROR_INDEX(LTTNG_ERR_OVERFLOW) ] = "Overflow occurred", [ ERROR_INDEX(LTTNG_ERR_SESSION_NOT_STARTED) ] = "Session not started", @@ -225,6 +225,8 @@ static const char *error_string_array[] = { [ 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", + [ ERROR_INDEX(LTTNG_ERR_USER_NOT_FOUND) ] = "User not found", + [ ERROR_INDEX(LTTNG_ERR_GROUP_NOT_FOUND) ] = "Group not found", /* Last element */ [ ERROR_INDEX(LTTNG_ERR_NR) ] = "Unknown error code"