From 6223570f28ad0fa3264905079cdefae5ee93c947 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 2 Apr 2015 18:07:45 -0400 Subject: [PATCH] UI: Only show tracker PID state when enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/list.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index b8d0046aa..a8ed99989 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -1253,16 +1253,16 @@ static int list_tracker_pids(void) { int enabled, ret; int *pids = NULL; - size_t nr_pids, i; + size_t nr_pids; ret = lttng_list_tracker_pids(handle, &enabled, &pids, &nr_pids); if (ret) { return ret; } - _MSG("PID tracker: [%s]", enabled ? "enabled" : "disabled"); if (enabled) { - _MSG(", pids: ["); + int i; + _MSG("PID tracker: ["); for (i = 0; i < nr_pids; i++) { if (i) { @@ -1270,9 +1270,8 @@ static int list_tracker_pids(void) } _MSG(" %d", pids[i]); } - _MSG(" ]"); + _MSG(" ]\n\n"); } - _MSG("\n\n"); free(pids); return 0; } -- 2.34.1