1 /* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
5 * wrapper around splice_to_pipe. Using KALLSYMS to get its address when
6 * available, else we need to have a kernel that exports this function to GPL
9 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 #ifdef CONFIG_KALLSYMS
14 #include <linux/kallsyms.h>
16 #include <linux/splice.h>
17 #include <wrapper/kallsyms.h>
20 ssize_t (*splice_to_pipe_sym
)(struct pipe_inode_info
*pipe
,
21 struct splice_pipe_desc
*spd
);
23 ssize_t
wrapper_splice_to_pipe(struct pipe_inode_info
*pipe
,
24 struct splice_pipe_desc
*spd
)
26 if (!splice_to_pipe_sym
)
27 splice_to_pipe_sym
= (void *) kallsyms_lookup_funcptr("splice_to_pipe");
28 if (splice_to_pipe_sym
) {
29 return splice_to_pipe_sym(pipe
, spd
);
31 printk_once(KERN_WARNING
"LTTng: splice_to_pipe symbol lookup failed.\n");
39 #include <linux/splice.h>
41 ssize_t
wrapper_splice_to_pipe(struct pipe_inode_info
*pipe
,
42 struct splice_pipe_desc
*spd
)
44 return splice_to_pipe(pipe
, spd
);
This page took 0.029218 seconds and 4 git commands to generate.