X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fload.c;h=002ec4958945ae2bc7caf9eb3c86537243290a84;hp=ad61849235d74220f5328e7bdc496fcabd6896ba;hb=ab5be9fa2eb5ba9600a82cd18fd3cfcbac69169a;hpb=4fc83d948cea6b10484e65f004a6c167e71ac440 diff --git a/src/bin/lttng/commands/load.c b/src/bin/lttng/commands/load.c index ad6184923..002ec4958 100644 --- a/src/bin/lttng/commands/load.c +++ b/src/bin/lttng/commands/load.c @@ -1,18 +1,8 @@ /* - * Copyright (C) 2014 - Jérémie Galarneau + * Copyright (C) 2014 Jérémie Galarneau * - * 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 @@ -163,6 +153,7 @@ int cmd_load(int argc, const char **argv) poptContext pc; struct lttng_load_session_attr *session_attr = NULL; char *input_path = NULL; + const char *leftover = NULL; pc = poptGetContext(NULL, argc, argv, load_opts, 0); poptReadDefaultConfig(pc, 0); @@ -206,6 +197,13 @@ int cmd_load(int argc, const char **argv) } } + 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);