2 * Copyright (C) 2011 Mathieu Desnoyers (mathieu.desnoyers@efficios.com)
4 * wrapper around splice_to_pipe. Using KALLSYMS to get its address when
5 * available, else we need to have a kernel that exports this function to GPL
8 * Dual LGPL v2.1/GPL v2 license.
11 #ifdef CONFIG_KALLSYMS
13 #include <linux/kallsyms.h>
15 #include <linux/splice.h>
19 ssize_t (*splice_to_pipe_sym
)(struct pipe_inode_info
*pipe
,
20 struct splice_pipe_desc
*spd
);
22 ssize_t
wrapper_splice_to_pipe(struct pipe_inode_info
*pipe
,
23 struct splice_pipe_desc
*spd
)
25 if (!splice_to_pipe_sym
)
26 splice_to_pipe_sym
= (void *) kallsyms_lookup_funcptr("splice_to_pipe");
27 if (splice_to_pipe_sym
) {
28 return splice_to_pipe_sym(pipe
, spd
);
30 printk(KERN_WARNING
"LTTng: splice_to_pipe symbol lookup failed.\n");
38 #include <linux/splice.h>
40 ssize_t
wrapper_splice_to_pipe(struct pipe_inode_info
*pipe
,
41 struct splice_pipe_desc
*spd
)
43 return splice_to_pipe(pipe
, spd
);
This page took 0.034815 seconds and 6 git commands to generate.