projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove compatibility code for lttng-tracepoint
[lttng-modules.git]
/
lttng-abi.c
diff --git
a/lttng-abi.c
b/lttng-abi.c
index 724d4f428a412ac7d3f74a935ecf15e890bc720f..7723aec8596aef6d7fce1601dd3152180e81ba2f 100644
(file)
--- a/
lttng-abi.c
+++ b/
lttng-abi.c
@@
-34,7
+34,6
@@
#include <wrapper/ringbuffer/vfs.h>
#include <wrapper/ringbuffer/backend.h>
#include <wrapper/ringbuffer/frontend.h>
#include <wrapper/ringbuffer/vfs.h>
#include <wrapper/ringbuffer/backend.h>
#include <wrapper/ringbuffer/frontend.h>
-#include <wrapper/file.h>
#include <lttng-string-utils.h>
#include <lttng-abi.h>
#include <lttng-abi-old.h>
#include <lttng-string-utils.h>
#include <lttng-abi.h>
#include <lttng-abi-old.h>
@@
-50,11
+49,7
@@
static struct proc_dir_entry *lttng_proc_dentry;
static struct proc_dir_entry *lttng_proc_dentry;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
static const struct proc_ops lttng_proc_ops;
static const struct proc_ops lttng_proc_ops;
-#else
-static const struct file_operations lttng_proc_ops;
-#endif
static const struct file_operations lttng_session_fops;
static const struct file_operations lttng_channel_fops;
static const struct file_operations lttng_session_fops;
static const struct file_operations lttng_channel_fops;
@@
-79,7
+74,7
@@
int lttng_abi_create_session(void)
session = lttng_session_create();
if (!session)
return -ENOMEM;
session = lttng_session_create();
if (!session)
return -ENOMEM;
- session_fd =
lttng_get_unused_fd(
);
+ session_fd =
get_unused_fd_flags(0
);
if (session_fd < 0) {
ret = session_fd;
goto fd_error;
if (session_fd < 0) {
ret = session_fd;
goto fd_error;
@@
-108,7
+103,7
@@
int lttng_abi_tracepoint_list(void)
struct file *tracepoint_list_file;
int file_fd, ret;
struct file *tracepoint_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;
if (file_fd < 0) {
ret = file_fd;
goto fd_error;
@@
-148,7
+143,7
@@
int lttng_abi_syscall_list(void)
struct file *syscall_list_file;
int file_fd, ret;
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;
if (file_fd < 0) {
ret = file_fd;
goto fd_error;
@@
-395,22
+390,12
@@
long lttng_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
}
}
}
}
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0))
static const struct proc_ops lttng_proc_ops = {
.proc_ioctl = lttng_ioctl,
#ifdef CONFIG_COMPAT
.proc_compat_ioctl = lttng_ioctl,
#endif /* CONFIG_COMPAT */
};
static const struct proc_ops lttng_proc_ops = {
.proc_ioctl = lttng_ioctl,
#ifdef CONFIG_COMPAT
.proc_compat_ioctl = lttng_ioctl,
#endif /* CONFIG_COMPAT */
};
-#else
-static const struct file_operations lttng_proc_ops = {
- .owner = THIS_MODULE,
- .unlocked_ioctl = lttng_ioctl,
-#ifdef CONFIG_COMPAT
- .compat_ioctl = lttng_ioctl,
-#endif /* CONFIG_COMPAT */
-};
-#endif
static
int lttng_abi_create_channel(struct file *session_file,
static
int lttng_abi_create_channel(struct file *session_file,
@@
-425,7
+410,7
@@
int lttng_abi_create_channel(struct file *session_file,
int chan_fd;
int ret = 0;
int chan_fd;
int ret = 0;
- chan_fd =
lttng_get_unused_fd(
);
+ chan_fd =
get_unused_fd_flags(0
);
if (chan_fd < 0) {
ret = chan_fd;
goto fd_error;
if (chan_fd < 0) {
ret = chan_fd;
goto fd_error;
@@
-1083,7
+1068,7
@@
int lttng_abi_create_stream_fd(struct file *channel_file, void *stream_priv,
int stream_fd, ret;
struct file *stream_file;
int stream_fd, ret;
struct file *stream_file;
- stream_fd =
lttng_get_unused_fd(
);
+ stream_fd =
get_unused_fd_flags(0
);
if (stream_fd < 0) {
ret = stream_fd;
goto fd_error;
if (stream_fd < 0) {
ret = stream_fd;
goto fd_error;
@@
-1219,7
+1204,7
@@
int lttng_abi_create_event(struct file *channel_file,
default:
break;
}
default:
break;
}
- event_fd =
lttng_get_unused_fd(
);
+ event_fd =
get_unused_fd_flags(0
);
if (event_fd < 0) {
ret = event_fd;
goto fd_error;
if (event_fd < 0) {
ret = event_fd;
goto fd_error;
This page took
0.02435 seconds
and
4
git commands to generate.