Fix: lttng list -u <name> should only list UST
[lttng-tools.git] / src / bin / lttng / commands / list.c
index 6a54279f912fa9984d7419a06fbe64c6f64fabaf..66a322a06adb650b2a593c9147a7d9ed556bf8ba 100644 (file)
@@ -475,6 +475,8 @@ static int list_ust_event_fields(void)
                        cmdline = get_cmdline_by_pid(cur_pid);
                        MSG("\nPID: %d - Name: %s", cur_pid, cmdline);
                        free(cmdline);
+                       /* Wipe current event since we are about to print a new PID. */
+                       memset(&cur_event, 0, sizeof(cur_event));
                }
                if (strcmp(cur_event.name, event_field_list[i].event.name) != 0) {
                        print_events(&event_field_list[i].event);
@@ -918,7 +920,7 @@ int cmd_list(int argc, const char **argv)
                        goto end;
                }
 
-               if (opt_kernel) {
+               if (opt_kernel || opt_userspace) {
                        /* Channel listing */
                        ret = list_channels(opt_channel);
                        if (ret < 0) {
This page took 0.024046 seconds and 4 git commands to generate.