Fix: enable-rotation: wrong type of rotation specified in message
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 1 Dec 2021 13:46:11 +0000 (08:46 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 10 Jan 2022 23:41:51 +0000 (18:41 -0500)
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 <jeremie.galarneau@efficios.com>
Change-Id: I3cb6fcb6a67d7b0fa4c7913694923b5f03255389

src/bin/lttng/commands/enable_rotation.cpp

index 0210f9cb6e9b18b41cc879316d9296bb80bd2c84..1719f3ac243dd166f3a347399afefcbeea08539a 100644 (file)
@@ -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,
This page took 0.025745 seconds and 4 git commands to generate.