rotation-api: pass session name explicitly
[lttng-tools.git] / src / bin / lttng / commands / disable_rotation.c
index e917cbdc172beb785f172f9bcb0c09e7d4cdff8f..b179e91ce33e8f91e94a3d741d9ef7a0a34e03ab 100644 (file)
 static char *opt_session_name;
 static struct mi_writer *writer;
 
+#ifdef LTTNG_EMBED_HELP
+static const char help_msg[] =
+#include <lttng-disable-rotation.1.h>
+;
+#endif
+
 enum {
        OPT_HELP = 1,
        OPT_LIST_OPTIONS,
@@ -71,11 +77,6 @@ static int setup_rotate(char *session_name, uint64_t timer, uint64_t size)
                }
        }
 
-       ret = lttng_rotation_schedule_attr_set_session_name(attr, session_name);
-       if (ret < 0) {
-               goto error;
-       }
-
        if (lttng_opt_mi) {
                ret = mi_lttng_writer_write_element_string(writer,
                                mi_lttng_element_session_name, session_name);
@@ -93,7 +94,7 @@ static int setup_rotate(char *session_name, uint64_t timer, uint64_t size)
                MSG("Disabling rotation based on size on session %s", session_name);
        }
 
-       ret = lttng_rotation_set_schedule(attr);
+       ret = lttng_rotation_set_schedule(session_name, attr);
        if (ret) {
                ERR("%s", lttng_strerror(ret));
                if (lttng_opt_mi) {
This page took 0.035238 seconds and 4 git commands to generate.