UI: Only show tracker PID state when enabled
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 2 Apr 2015 22:07:45 +0000 (18:07 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 2 Apr 2015 22:07:45 +0000 (18:07 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/commands/list.c

index b8d0046aa50e4491d82fd92c89c5a3a702b516b6..a8ed999899d89fa83da56e8dc84fd9a00fbf73a4 100644 (file)
@@ -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;
 }
This page took 0.027167 seconds and 4 git commands to generate.