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.8.0-rc1~104 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=db906c125f293467e08c043f27d2797fb748b23e 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 38db11ebb..33ecff062 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -590,7 +590,7 @@ static int list_lttng_kernel_events(char *channel_name, if (nb_event == 0) { *total_size = 0; *events = NULL; - goto syscall; + goto end; } /* Compute required extended infos size */ @@ -653,19 +653,7 @@ static int list_lttng_kernel_events(char *channel_name, &extended_at); } -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: