X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flttng-syscalls.c;h=d93df2e1306e00ca0e60c3504177e7254b1a692e;hb=74019c61b437c21b11b7190800ca8ab859042f6c;hp=d5e5df4a9bb9575d6417667ffffe9de2aa75ada2;hpb=5987e66c2cba50425d775ce587dd763244373e16;p=lttng-modules.git diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index d5e5df4a..d93df2e1 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -25,7 +25,6 @@ #include #include -#include #include #include #include @@ -66,30 +65,6 @@ enum sc_type { void syscall_entry_event_probe(void *__data, struct pt_regs *regs, long id); void syscall_exit_event_probe(void *__data, struct pt_regs *regs, long ret); -/* - * Forward declarations for old kernels. - */ -struct mmsghdr; -struct rlimit64; -struct oldold_utsname; -struct old_utsname; -struct sel_arg_struct; -struct mmap_arg_struct; -struct file_handle; -struct user_msghdr; - -/* - * Forward declaration for kernels >= 5.6 - */ -struct timex; -struct timeval; -struct itimerval; -struct itimerspec; - -#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,6,0)) -typedef __kernel_old_time_t time_t; -#endif - #ifdef IA32_NR_syscalls #define NR_compat_syscalls IA32_NR_syscalls #else @@ -840,7 +815,7 @@ int lttng_event_enabler_create_syscall_events_if_missing(struct lttng_event_enab lttng_syscall_event_enabler_create_matching_events(syscall_event_enabler); - return ret; + return 0; } int lttng_syscalls_unregister_syscall_table(struct lttng_kernel_syscall_table *syscall_table) @@ -975,7 +950,7 @@ int lttng_syscall_filter_enable_event(struct lttng_kernel_event_common *event) struct lttng_kernel_syscall_table *syscall_table = get_syscall_table_from_event(event); unsigned int syscall_id = event->priv->u.syscall.syscall_id; struct hlist_head *dispatch_list; - int ret; + int ret = 0; WARN_ON_ONCE(event->priv->instrumentation != LTTNG_KERNEL_ABI_SYSCALL); @@ -1321,7 +1296,7 @@ int lttng_abi_syscall_list(void) struct file *syscall_list_file; int file_fd, ret; - file_fd = lttng_get_unused_fd(); + file_fd = get_unused_fd_flags(0); if (file_fd < 0) { ret = file_fd; goto fd_error;