X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Fsave.c;h=59cd715682719d24976c81bba173e3c68eda4866;hb=ab5be9fa2eb5ba9600a82cd18fd3cfcbac69169a;hp=4ba90243698c9c13e50b3efc93dc1b57ab98c48d;hpb=4fc83d948cea6b10484e65f004a6c167e71ac440;p=lttng-tools.git diff --git a/src/bin/lttng/commands/save.c b/src/bin/lttng/commands/save.c index 4ba902436..59cd71568 100644 --- a/src/bin/lttng/commands/save.c +++ b/src/bin/lttng/commands/save.c @@ -1,18 +1,8 @@ /* - * Copyright (C) 2013 - Jérémie Galarneau + * Copyright (C) 2013 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 @@ -127,7 +117,7 @@ int cmd_save(int argc, const char **argv) { int ret = CMD_SUCCESS, command_ret = CMD_SUCCESS, success; int opt; - const char *session_name = NULL; + const char *session_name = NULL, *leftover = NULL; poptContext pc; struct lttng_save_session_attr *attr; @@ -164,6 +154,13 @@ int cmd_save(int argc, const char **argv) } } + leftover = poptGetArg(pc); + if (leftover) { + ERR("Unknown argument: %s", leftover); + ret = CMD_ERROR; + goto end; + } + attr = lttng_save_session_attr_create(); if (!attr) { ret = CMD_FATAL;