X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fcmd.c;h=e88ad0d0de4b3439f88d417ad58e82f58b9c99f3;hp=53a72d9b8d9129e04faac25ab84d81f214d2babd;hb=2c2de71ef6dae09fa1a61f02051b68f60b0a1750;hpb=fcf3687f584a8b24b96b71a9ae0bf1028ab677f4 diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 53a72d9b8..e88ad0d0d 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -5047,58 +5047,6 @@ end: return ret; } -/* - * Command ROTATE_GET_CURRENT_PATH from the lttng-ctl library. - * - * Configure the automatic rotation parameters. - * Set to -1ULL to disable them. - * - * Return LTTNG_OK on success or else a LTTNG_ERR code. - */ -int cmd_session_get_current_output(struct ltt_session *session, - struct lttng_session_get_current_output_return *output_return) -{ - int ret; - const char *path; - - if (!session->snapshot_mode) { - if (session->current_archive_id == 0) { - if (session->kernel_session) { - path = session_get_base_path(session); - } else if (session->ust_session) { - path = session_get_base_path(session); - } else { - abort(); - } - assert(path); - } else { - path = session->rotation_chunk.active_tracing_path; - } - } else { - /* - * A snapshot session does not have a "current" trace archive - * location. - */ - path = ""; - } - - DBG("Cmd get current output for session %s, returning %s", - session->name, path); - - ret = lttng_strncpy(output_return->path, - path, - sizeof(output_return->path)); - if (ret) { - ERR("Failed to copy trace output path to session get current output command reply"); - ret = -LTTNG_ERR_UNK; - goto end; - } - - ret = LTTNG_OK; -end: - return ret; -} - /* Wait for a given path to be removed before continuing. */ static enum lttng_error_code wait_on_path(void *path_data) {