From: Jérémie Galarneau Date: Wed, 1 Dec 2021 13:46:11 +0000 (-0500) Subject: Fix: enable-rotation: wrong type of rotation specified in message X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4e9db781daa52072d9b0d235691bfad79538e791;p=lttng-tools.git Fix: enable-rotation: wrong type of rotation specified in message 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 --- 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,