X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fstart.c;h=7082e097dfa5a3dcc9f9f7b384d7bfbbd90b2ea2;hb=4942c25609805b81dc67ea4447eac7f9cddac655;hp=0287fc7e8cf144a4fee7b574862ae85f892561d9;hpb=4fc83d948cea6b10484e65f004a6c167e71ac440;p=lttng-tools.git diff --git a/src/bin/lttng/commands/start.c b/src/bin/lttng/commands/start.c index 0287fc7e8..7082e097d 100644 --- a/src/bin/lttng/commands/start.c +++ b/src/bin/lttng/commands/start.c @@ -1,18 +1,8 @@ /* - * Copyright (C) 2011 - David Goulet + * Copyright (C) 2011 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 @@ -144,6 +134,7 @@ int cmd_start(int argc, const char **argv) { int opt, ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success = 1; static poptContext pc; + const char *leftover = NULL; pc = poptGetContext(NULL, argc, argv, long_options, 0); poptReadDefaultConfig(pc, 0); @@ -164,6 +155,13 @@ int cmd_start(int argc, const char **argv) opt_session_name = (char*) poptGetArg(pc); + leftover = poptGetArg(pc); + if (leftover) { + ERR("Unknown argument: %s", leftover); + ret = CMD_ERROR; + goto end; + } + /* Mi check */ if (lttng_opt_mi) { writer = mi_lttng_writer_create(fileno(stdout), lttng_opt_mi);