X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng%2Fcommands%2Flist.c;h=bc59e626f08fe998cd8f2e7e20749092f6cdde36;hb=cd7b292775db15d15db74519e5c8673834bbbff5;hp=13a5d91f3ca2668125369ca982e979b19f857514;hpb=755066c271c15091a9fad9e065a05970733f5593;p=lttng-tools.git diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c index 13a5d91f3..bc59e626f 100644 --- a/src/bin/lttng/commands/list.c +++ b/src/bin/lttng/commands/list.c @@ -340,8 +340,8 @@ static int mi_list_agent_ust_events(struct lttng_event *events, int count, goto end; } - /* Open processes element */ - ret = mi_lttng_processes_open(writer); + /* Open pids element element */ + ret = mi_lttng_pids_open(writer); if (ret) { goto end; } @@ -366,7 +366,7 @@ static int mi_list_agent_ust_events(struct lttng_event *events, int count, if (!pid_element_open) { /* Open and write a pid element */ - ret = mi_lttng_process(writer, cur_pid, cmdline, 1); + ret = mi_lttng_pid(writer, cur_pid, cmdline, 1); if (ret) { goto error; } @@ -389,7 +389,7 @@ static int mi_list_agent_ust_events(struct lttng_event *events, int count, } } - /* Close processes */ + /* Close pids */ ret = mi_lttng_writer_close_element(writer); if (ret) { goto end; @@ -577,8 +577,8 @@ static int mi_list_ust_event_fields(struct lttng_event_field *fields, int count, goto end; } - /* Open processes element */ - ret = mi_lttng_processes_open(writer); + /* Open pids element */ + ret = mi_lttng_pids_open(writer); if (ret) { goto end; } @@ -606,8 +606,8 @@ static int mi_list_ust_event_fields(struct lttng_event_field *fields, int count, cur_pid = fields[i].event.pid; cmdline = get_cmdline_by_pid(cur_pid); if (!pid_element_open) { - /* Open and write a process element */ - ret = mi_lttng_process(writer, cur_pid, cmdline, 1); + /* Open and write a pid element */ + ret = mi_lttng_pid(writer, cur_pid, cmdline, 1); if (ret) { goto error; } @@ -661,7 +661,7 @@ static int mi_list_ust_event_fields(struct lttng_event_field *fields, int count, } } - /* Close processes, domain, domains */ + /* Close pid, domain, domains */ ret = mi_lttng_close_multi_element(writer, 3); end: return ret; @@ -1855,7 +1855,8 @@ int cmd_list(int argc, const char **argv) if (ret) { goto end; } - continue; + + goto next_domain; } switch (domains[i].type) { @@ -1875,6 +1876,7 @@ int cmd_list(int argc, const char **argv) goto end; } +next_domain: if (lttng_opt_mi) { /* Close domain element */ ret = mi_lttng_writer_close_element(writer);