From c0e2990d32d1e55c783c7eb3299f23a7ce062270 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Fri, 19 Mar 2021 16:11:40 -0400 Subject: [PATCH] Cleanup: reuse `lttng_action_type_string()` to print action names MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Francis Deslauriers Signed-off-by: Jérémie Galarneau Change-Id: I86be1201466a11510ded9da34311650a8aadd1e2 --- src/bin/lttng-sessiond/action-executor.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/bin/lttng-sessiond/action-executor.c b/src/bin/lttng-sessiond/action-executor.c index e5e72b09f..bce7268e5 100644 --- a/src/bin/lttng-sessiond/action-executor.c +++ b/src/bin/lttng-sessiond/action-executor.c @@ -95,22 +95,13 @@ static const action_executor_handler action_executors[] = { [LTTNG_ACTION_TYPE_GROUP] = action_executor_group_handler, }; -static const char *action_type_names[] = { - [LTTNG_ACTION_TYPE_NOTIFY] = "Notify", - [LTTNG_ACTION_TYPE_START_SESSION] = "Start session", - [LTTNG_ACTION_TYPE_STOP_SESSION] = "Stop session", - [LTTNG_ACTION_TYPE_ROTATE_SESSION] = "Rotate session", - [LTTNG_ACTION_TYPE_SNAPSHOT_SESSION] = "Snapshot session", - [LTTNG_ACTION_TYPE_GROUP] = "Group", -}; - static const char *get_action_name(const struct lttng_action *action) { const enum lttng_action_type action_type = lttng_action_get_type(action); assert(action_type != LTTNG_ACTION_TYPE_UNKNOWN); - return action_type_names[action_type]; + return lttng_action_type_string(action_type); } /* Check if this trigger allowed to interect with a given session. */ -- 2.34.1