The lttng track/untrack command, when used to track/untrack all
PIDs, prints a message of the following form:
"PID -1 untracked in session auto-
20171113-210309"
This is because -1 is taken to mean "all" by the API and is used
as-is to print the message on the CLI.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
break;
}
} else {
- MSG("PID %i %sed in session %s",
- pid_list[i], cmd_str, session_name);
+ if (pid_list[i] != -1) {
+ MSG("PID %i %sed in session %s",
+ pid_list[i], cmd_str,
+ session_name);
+ } else {
+ MSG("All PIDs %sed in session %s",
+ cmd_str, session_name);
+ }
success = 1;
}