/*
- * Copyright (C) 2017 - Julien Desfossez <jdesfossez@efficios.com>
+ * Copyright (C) 2017 Julien Desfossez <jdesfossez@efficios.com>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, version 2 only,
- * as published by the Free Software Foundation.
+ * SPDX-License-Identifier: GPL-2.0-only
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#define _LGPL_SOURCE
#include <common/utils.h>
#include "../command.h"
-#include <lttng/rotation.h>
+#include <lttng/lttng.h>
static char *opt_session_name;
static struct mi_writer *writer;
ret = CMD_ERROR;
goto end;
default:
- ERR("Unknown error occured setting %s rotation schedule",
+ ERR("Unknown error occurred setting %s rotation schedule",
schedule_type_name);
ret = CMD_ERROR;
goto end;
ret = CMD_SUCCESS;
switch (schedule_type) {
case LTTNG_ROTATION_SCHEDULE_TYPE_PERIODIC:
- MSG("Enabled %s rotations every %" PRIu64 " ยตs on session %s",
- schedule_type_name, value, session_name);
+ MSG("Enabled %s rotations every %" PRIu64 " %s on session %s",
+ schedule_type_name, value, USEC_UNIT, session_name);
break;
case LTTNG_ROTATION_SCHEDULE_TYPE_SIZE_THRESHOLD:
MSG("Enabled %s rotations every %" PRIu64 " bytes written on session %s",
}
if (size_rotation) {
- enum lttng_error_code tmp_ret;
+ enum cmd_error_code tmp_ret;
/* Don't overwrite cmd_ret if it already indicates an error. */
tmp_ret = add_schedule(session_name,