X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fsnapshot.c;h=513257a3c43f8bf8785f60b5ec52fddbf1714d36;hb=29bcf415306cac513618483defc4251bc49aa1c3;hp=33ab5d99516186814987f251df01a952eb2b9a29;hpb=54213acc35b30fa5e95dd275c31cfb584d4e4abf;p=lttng-tools.git diff --git a/src/bin/lttng/commands/snapshot.c b/src/bin/lttng/commands/snapshot.c index 33ab5d995..513257a3c 100644 --- a/src/bin/lttng/commands/snapshot.c +++ b/src/bin/lttng/commands/snapshot.c @@ -1,18 +1,8 @@ /* - * Copyright (C) 2013 - David Goulet + * Copyright (C) 2013 David Goulet * - * 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 @@ -29,7 +19,7 @@ #include #include -#include +#include #include "../command.h" @@ -375,6 +365,7 @@ static int cmd_del_output(int argc, const char **argv) long id; if (argc < 2) { + ERR("A snapshot output name or id must be provided to delete a snapshot output."); ret = CMD_ERROR; goto end; } @@ -633,10 +624,11 @@ int cmd_snapshot(int argc, const char **argv) case OPT_MAX_SIZE: { uint64_t val; - const char *opt = poptGetOptArg(pc); + const char *max_size_arg = poptGetOptArg(pc); - if (utils_parse_size_suffix((char *) opt, &val) < 0) { - ERR("Unable to handle max-size value %s", opt); + if (utils_parse_size_suffix((char *) max_size_arg, &val) < 0) { + ERR("Unable to handle max-size value %s", + max_size_arg); cmd_ret = CMD_ERROR; goto end; }