From: Jérémie Galarneau Date: Tue, 8 Mar 2016 17:06:14 +0000 (-0500) Subject: Fix: Only list kernel enablers when listing events X-Git-Tag: v2.7.2~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9ac243ac4b38eca8de552c28ccf68ccabf325f7f;p=lttng-tools.git Fix: Only list kernel enablers when listing events lttng list would list kernel enablers and individual enabled syscalls which would result in a confusing output. For instance, enabling the "open" syscall with a filter would result in a list output displaying both the enabler, the syscall's name + its filter, and the syscall on its own, without any mention of an enabled filter. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index b71a56504..1ca9850a8 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -365,7 +365,7 @@ static int list_lttng_kernel_events(char *channel_name, if (nb_event == 0) { *events = NULL; - goto syscall; + goto end; } *events = zmalloc(nb_event * sizeof(struct lttng_event)); @@ -414,19 +414,7 @@ static int list_lttng_kernel_events(char *channel_name, i++; } -syscall: - if (syscall_table) { - ssize_t new_size; - - new_size = syscall_list_channel(kchan, events, nb_event); - if (new_size < 0) { - free(events); - ret = -new_size; - goto error; - } - nb_event = new_size; - } - +end: return nb_event; error: