summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2013-08-15 07:54:31 +0000
committerglebius <glebius@FreeBSD.org>2013-08-15 07:54:31 +0000
commit722a1a5e5d54a4935a4136368f443f6c88ca0d71 (patch)
tree72f140bc20e3f03e8744a0112282734ba89f474b /sys/kern/vfs_vnops.c
parent8c7687b41c874820110a7106c1167f5b0e3fc7d0 (diff)
downloadFreeBSD-src-722a1a5e5d54a4935a4136368f443f6c88ca0d71.zip
FreeBSD-src-722a1a5e5d54a4935a4136368f443f6c88ca0d71.tar.gz
Make sendfile() a method in the struct fileops. Currently only
vnode backed file descriptors have this method implemented. Reviewed by: kib Sponsored by: Nginx, Inc. Sponsored by: Netflix
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 06e59f9..2fcbf97 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -88,6 +88,7 @@ static fo_poll_t vn_poll;
static fo_kqfilter_t vn_kqfilter;
static fo_stat_t vn_statfile;
static fo_close_t vn_closefile;
+extern fo_sendfile_t vn_sendfile;
struct fileops vnops = {
.fo_read = vn_io_fault,
@@ -100,6 +101,7 @@ struct fileops vnops = {
.fo_close = vn_closefile,
.fo_chmod = vn_chmod,
.fo_chown = vn_chown,
+ .fo_sendfile = vn_sendfile,
.fo_flags = DFLAG_PASSABLE | DFLAG_SEEKABLE
};
OpenPOWER on IntegriCloud