Fix: Only list kernel enablers when listing events
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 8 Mar 2016 17:06:14 +0000 (12:06 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 9 Mar 2016 20:56:27 +0000 (15:56 -0500)
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 <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/cmd.c

index b71a56504ad1e13b2c40c1d33251929272a591c5..1ca9850a816cf695b2c45855778c5583458adb29 100644 (file)
@@ -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:
This page took 0.034359 seconds and 4 git commands to generate.