#include "kernel-consumer.h"
#include "lttng-sessiond.h"
#include "utils.h"
+#include "syscall.h"
#include "cmd.h"
DBG("Listing events for channel %s", kchan->channel->name);
if (nb_event == 0) {
- goto end;
+ *events = NULL;
+ goto syscall;
}
*events = zmalloc(nb_event * sizeof(struct lttng_event));
i++;
}
-end:
+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;
+ }
+
return nb_event;
error:
return -ret;
}
+ssize_t cmd_list_syscalls(struct lttng_event **events)
+{
+ return syscall_table_list(events);
+}
+
/*
* Command LTTNG_START_TRACE processed by the client thread.
*/