summaryrefslogtreecommitdiff
path: root/examples/VFS
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-12-02 16:25:59 -0800
committerJeremy Allison <jra@samba.org>2010-12-02 16:25:59 -0800
commit5819a36aef030772f1e9da81655c1f911a10372c (patch)
tree8746c0f52b94f3b2bd722474b653860b10df2a14 /examples/VFS
parentde8ceb5364de86f9b016251201474f011c16f6cb (diff)
downloadsamba-5819a36aef030772f1e9da81655c1f911a10372c.tar.gz
samba-5819a36aef030772f1e9da81655c1f911a10372c.tar.bz2
samba-5819a36aef030772f1e9da81655c1f911a10372c.zip
Move posix_fallocate into the VFS where it belongs.
Jeremy.
Diffstat (limited to 'examples/VFS')
-rw-r--r--examples/VFS/skel_opaque.c8
-rw-r--r--examples/VFS/skel_transparent.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 42f4e48cd9..40ee5e9d6e 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -308,6 +308,13 @@ static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_
return -1;
}
+static int skel_posix_fallocate(vfs_handle_struct *handle, files_struct *fsp,
+ SMB_OFF_T offset, SMB_OFF_T len)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
{
errno = ENOSYS;
@@ -813,6 +820,7 @@ struct vfs_fn_pointers skel_transparent_fns = {
.getwd = skel_getwd,
.ntimes = skel_ntimes,
.ftruncate = skel_ftruncate,
+ .posix_fallocate = skel_posix_fallocate,
.lock = skel_lock,
.kernel_flock = skel_kernel_flock,
.linux_setlease = skel_linux_setlease,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 42e54a8871..ca22a30564 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -292,6 +292,13 @@ static int skel_ftruncate(vfs_handle_struct *handle, files_struct *fsp, SMB_OFF_
return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset);
}
+static int skel_posix_fallocate(vfs_handle_struct *handle, files_struct *fsp,
+ SMB_OFF_T offset,
+ SMB_OFF_T len)
+{
+ return SMB_VFS_NEXT_POSIX_FALLOCATE(handle, fsp, offset, len);
+}
+
static bool skel_lock(vfs_handle_struct *handle, files_struct *fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type)
{
return SMB_VFS_NEXT_LOCK(handle, fsp, op, offset, count, type);
@@ -757,6 +764,7 @@ struct vfs_fn_pointers skel_transparent_fns = {
.getwd = skel_getwd,
.ntimes = skel_ntimes,
.ftruncate = skel_ftruncate,
+ .posix_fallocate = skel_posix_fallocate,
.lock = skel_lock,
.kernel_flock = skel_kernel_flock,
.linux_setlease = skel_linux_setlease,