sessiond: rename syscall.h so it does not conflict with system
[lttng-tools.git] / src / bin / lttng-sessiond / save.c
index 3c6b5b8a01931540cbd050a9600f969e0076b471..b7d0cc80a40d4d9fb47d4b17aaaa9e683c7e2776 100644 (file)
@@ -32,7 +32,7 @@
 #include "kernel.h"
 #include "save.h"
 #include "session.h"
-#include "syscall.h"
+#include "lttng-syscall.h"
 #include "trace-ust.h"
 #include "agent.h"
 
@@ -1673,7 +1673,7 @@ int save_consumer_output(struct config_writer *writer,
        switch (output->type) {
        case CONSUMER_DST_LOCAL:
                ret = config_writer_write_element_string(writer,
-                       config_element_path, output->dst.trace_path);
+                       config_element_path, output->dst.session_root_path);
                if (ret) {
                        ret = LTTNG_ERR_SAVE_IO_FAIL;
                        goto end;
@@ -2033,7 +2033,8 @@ int save_session(struct ltt_session *session,
                goto end;
        }
 
-       if (session->snapshot_mode || session->live_timer) {
+       if (session->snapshot_mode || session->live_timer ||
+                       session->rotate_timer_period || session->rotate_size) {
                ret = config_writer_open_element(writer, config_element_attributes);
                if (ret) {
                        ret = LTTNG_ERR_SAVE_IO_FAIL;
@@ -2047,7 +2048,7 @@ int save_session(struct ltt_session *session,
                                ret = LTTNG_ERR_SAVE_IO_FAIL;
                                goto end;
                        }
-               } else {
+               } else if (session->live_timer) {
                        ret = config_writer_write_element_unsigned_int(writer,
                                        config_element_live_timer_interval, session->live_timer);
                        if (ret) {
@@ -2055,6 +2056,25 @@ int save_session(struct ltt_session *session,
                                goto end;
                        }
                }
+               if (session->rotate_timer_period) {
+                       ret = config_writer_write_element_unsigned_int(writer,
+                                       config_element_rotation_timer_interval,
+                                       session->rotate_timer_period);
+                       if (ret) {
+                               ret = LTTNG_ERR_SAVE_IO_FAIL;
+                               goto end;
+                       }
+               }
+
+               if (session->rotate_size) {
+                       ret = config_writer_write_element_unsigned_int(writer,
+                                       config_element_rotation_size,
+                                       session->rotate_size);
+                       if (ret) {
+                               ret = LTTNG_ERR_SAVE_IO_FAIL;
+                               goto end;
+                       }
+               }
 
                /* /attributes */
                ret = config_writer_close_element(writer);
This page took 0.026598 seconds and 4 git commands to generate.