Truncate exclusion names to have a terminal '\0'
[lttng-tools.git] / src / bin / lttng-sessiond / syscall.c
index c38f8910940f0b8bb990034ed4fa0fcef0360fef..7b9227b86912f8a80628167fdc2908df2eb6ccf4 100644 (file)
@@ -15,7 +15,6 @@
  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE
 #define _LGPL_SOURCE
 #include <common/bitfield.h>
 #include <common/common.h>
@@ -73,7 +72,7 @@ int syscall_init_table(void)
        }
 
        while (fscanf(fp,
-                               "syscall { index = %lu; \
+                               "syscall { index = %zu; \
                                name = %" XSTR(SYSCALL_NAME_LEN) "[^;]; \
                                bitness = %u; };\n",
                                &index, name, &bitness) == 3) {
@@ -409,6 +408,7 @@ ssize_t syscall_list_channel(struct ltt_kernel_channel *kchan,
                ksyscall = lookup_syscall(syscalls_ht, syscall_table[i].name);
                if (ksyscall) {
                        update_event_syscall_bitness(events, i, ksyscall->index);
+                       rcu_read_unlock();
                        continue;
                }
                ksyscall = NULL;
@@ -423,7 +423,7 @@ ssize_t syscall_list_channel(struct ltt_kernel_channel *kchan,
                strncpy(events[count].name, syscall_table[i].name,
                                sizeof(events[count].name));
                events[count].enabled = 1;
-               events[count].type = LTTNG_KERNEL_SYSCALL;
+               events[count].type = LTTNG_EVENT_SYSCALL;
                count++;
        }
 
This page took 0.02654 seconds and 4 git commands to generate.