Move to kernel style SPDX license identifiers
[lttng-tools.git] / src / bin / lttng / commands / load.c
index ad61849235d74220f5328e7bdc496fcabd6896ba..002ec4958945ae2bc7caf9eb3c86537243290a84 100644 (file)
@@ -1,18 +1,8 @@
 /*
- * Copyright (C) 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright (C) 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
- * 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);
This page took 0.024916 seconds and 5 git commands to generate.