From 4e9db781daa52072d9b0d235691bfad79538e791 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 1 Dec 2021 08:46:11 -0500 Subject: [PATCH] Fix: enable-rotation: wrong type of rotation specified in message MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 48a4000 changed the initialization of the schedule_type_str to allow the code to compile as C++. The C-version of the code explicitly specified the enum values which was "safer" while the C++ version assumes that the array is initialized in the order of the enum's values. This results in an incorrect message when enabling a rotation schedule. For instance, enabling a periodic rotation will print that a "size-based" rotation was successfully enabled. Signed-off-by: Jérémie Galarneau Change-Id: I3cb6fcb6a67d7b0fa4c7913694923b5f03255389 --- src/bin/lttng/commands/enable_rotation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng/commands/enable_rotation.cpp b/src/bin/lttng/commands/enable_rotation.cpp index 0210f9cb6..1719f3ac2 100644 --- a/src/bin/lttng/commands/enable_rotation.cpp +++ b/src/bin/lttng/commands/enable_rotation.cpp @@ -50,8 +50,8 @@ static struct poptOption long_options[] = { }; static const char *schedule_type_str[] = { - "periodic", "size-based", + "periodic", }; static enum cmd_error_code add_schedule(const char *session_name, -- 2.34.1