From: Jérémie Galarneau Date: Thu, 2 Apr 2015 22:07:45 +0000 (-0400) Subject: UI: Only show tracker PID state when enabled X-Git-Tag: v2.7.0-rc1~52 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=6223570f28ad0fa3264905079cdefae5ee93c947 UI: Only show tracker PID state when enabled Signed-off-by: Jérémie Galarneau --- 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; }