X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fenable_rotation.c;h=c10c6a2d7f475fc93641e05936cde7ec2d7021d4;hp=3c2bd787ecefc40b940fe511b6db27f9af153985;hb=050dd63950efb32bc79cdb68866792d4f808a1b0;hpb=66ea93b10c703e1b3dda1e17109eed9138e4ece2 diff --git a/src/bin/lttng/commands/enable_rotation.c b/src/bin/lttng/commands/enable_rotation.c index 3c2bd787e..c10c6a2d7 100644 --- a/src/bin/lttng/commands/enable_rotation.c +++ b/src/bin/lttng/commands/enable_rotation.c @@ -1,18 +1,8 @@ /* - * Copyright (C) 2017 - Julien Desfossez + * Copyright (C) 2017 Julien Desfossez * - * 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 @@ -31,7 +21,7 @@ #include #include "../command.h" -#include +#include static char *opt_session_name; static struct mi_writer *writer; @@ -106,7 +96,7 @@ static enum cmd_error_code add_schedule(const char *session_name, 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; @@ -118,8 +108,8 @@ static enum cmd_error_code add_schedule(const char *session_name, 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", @@ -296,7 +286,7 @@ int cmd_enable_rotation(int argc, const char **argv) } 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,