X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flttng-syscalls.c;h=d93df2e1306e00ca0e60c3504177e7254b1a692e;hb=93e5bcec1d8d550a1983bbc013248dbd83573cc7;hp=6ea9f13d5542a3160887768e63e3385ac5c80c5c;hpb=999033797f1e2f90c6e5d013eb9972f1ea1b4a75;p=lttng-modules.git diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index 6ea9f13d..d93df2e1 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -25,9 +25,9 @@ #include #include -#include #include #include +#include #include #include #include @@ -65,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 @@ -839,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) @@ -974,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); @@ -1320,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;