X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fsave.c;h=18d303cac9184cbd82ba0671c4b92e75b8eb91e0;hb=106d4b465b1e53ee4c38976253a284a1d4c7512d;hp=fd6c5d894e6f9a7ef099ba3a01088bb114bd870b;hpb=95a29ab808f93c74a910b2fc8ee25833bfbc46d7;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/save.c b/src/bin/lttng-sessiond/save.c index fd6c5d894..18d303cac 100644 --- a/src/bin/lttng-sessiond/save.c +++ b/src/bin/lttng-sessiond/save.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -679,7 +678,7 @@ int save_kernel_context(struct config_writer *writer, goto end; } - if (ctx->ctx == LTTNG_KERNEL_CONTEXT_PERF_COUNTER) { + if (ctx->ctx == LTTNG_KERNEL_CONTEXT_PERF_CPU_COUNTER) { ret = config_writer_open_element(writer, config_element_perf); if (ret) { ret = LTTNG_ERR_SAVE_IO_FAIL; @@ -1478,7 +1477,8 @@ int save_session(struct ltt_session *session, config_file_path[len] = '\0'; if (!access(config_file_path, F_OK) && !attr->overwrite) { - /* A file with the same name already exists, skip */ + /* File exists, notify the user since the overwrite flag is off. */ + ret = LTTNG_ERR_SAVE_FILE_EXIST; goto end; } @@ -1523,7 +1523,7 @@ int save_session(struct ltt_session *session, } ret = config_writer_write_element_bool(writer, config_element_started, - session->enabled); + session->active); if (ret) { ret = LTTNG_ERR_SAVE_IO_FAIL; goto end;