Fix: lttng: incorrect domain list printed when no domain is provided
[lttng-tools.git] / src / bin / lttng / commands / track-untrack.c
index f503c35617b7633e8d32f57b33e2dc42a57a1c5b..498e7ed31e938cb5fbc7d0a39b4f6528f2418d46 100644 (file)
@@ -1,19 +1,9 @@
 /*
- * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
- * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
+ * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@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
@@ -461,7 +451,7 @@ static enum cmd_error_code track_untrack_id(enum cmd_type cmd_type,
 
                ret = cmd_func(handle, tracker_type, item);
                if (ret) {
-                       char *msg = NULL;
+                       const char *msg = NULL;
 
                        switch (-ret) {
                        case LTTNG_ERR_ID_TRACKED:
@@ -680,7 +670,8 @@ int cmd_track_untrack(enum cmd_type cmd_type, const char *cmd_str,
                }
        }
 
-       ret = print_missing_or_multiple_domains(opt_kernel + opt_userspace);
+       ret = print_missing_or_multiple_domains(
+                       opt_kernel + opt_userspace, false);
        if (ret) {
                command_ret = CMD_ERROR;
                goto end;
@@ -729,7 +720,7 @@ int cmd_track_untrack(enum cmd_type cmd_type, const char *cmd_str,
        leftover = poptGetArg(pc);
        if (leftover) {
                ERR("Unknown argument: %s", leftover);
-               ret = CMD_ERROR;
+               command_ret = CMD_ERROR;
                goto end;
        }
 
This page took 0.023534 seconds and 4 git commands to generate.