summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/VFS/skel_opaque.c12
-rw-r--r--examples/VFS/skel_transparent.c10
2 files changed, 22 insertions, 0 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index de82801d85..310d305cee 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -111,11 +111,21 @@ static ssize_t skel_read(vfs_handle_struct *handle, files_struct *fsp, int fd, v
return vfswrap_read(NULL, fsp, fd, data, n);
}
+static ssize_t skel_pread(vfs_handle_struct *handle, struct files_struct *fsp, int fd, void *data, size_t n, SMB_OFF_T offset)
+{
+ return vfswrap_pread(NULL, fsp, fd, data, n, offset);
+}
+
static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp, int fd, const void *data, size_t n)
{
return vfswrap_write(NULL, fsp, fd, data, n);
}
+ssize_t skel_pwrite(vfs_handle_struct *handle, struct files_struct *fsp, int fd, const void *data, size_t n, SMB_OFF_T offset)
+{
+ return vfswrap_pwrite(NULL, fsp, fd, data, n, offset);
+}
+
static SMB_OFF_T skel_lseek(vfs_handle_struct *handle, files_struct *fsp, int filedes, SMB_OFF_T offset, int whence)
{
return vfswrap_lseek(NULL, fsp, filedes, offset, whence);
@@ -488,7 +498,9 @@ static vfs_op_tuple skel_op_tuples[] = {
{SMB_VFS_OP(skel_open), SMB_VFS_OP_OPEN, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_close), SMB_VFS_OP_CLOSE, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_read), SMB_VFS_OP_READ, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_pread), SMB_VFS_OP_PREAD, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_write), SMB_VFS_OP_WRITE, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_pwrite), SMB_VFS_OP_PWRITE, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_lseek), SMB_VFS_OP_LSEEK, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_rename), SMB_VFS_OP_RENAME, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_fsync), SMB_VFS_OP_FSYNC, SMB_VFS_LAYER_OPAQUE},
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 7a326741c5..448390e72f 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -110,11 +110,21 @@ static ssize_t skel_read(vfs_handle_struct *handle, files_struct *fsp, int fd, v
return SMB_VFS_NEXT_READ(handle, fsp, fd, data, n);
}
+static ssize_t skel_pread(vfs_handle_struct *handle, files_struct *fsp, int fd, void *data, size_t n, SMB_OFF_T offset)
+{
+ return SMB_VFS_NEXT_PREAD(handle, fsp, fd, data, n, offset);
+}
+
static ssize_t skel_write(vfs_handle_struct *handle, files_struct *fsp, int fd, const void *data, size_t n)
{
return SMB_VFS_NEXT_WRITE(handle, fsp, fd, data, n);
}
+static ssize_t skel_pwrite(vfs_handle_struct *handle, files_struct *fsp, int fd, const void *data, size_t n, SMB_OFF_T offset)
+{
+ return SMB_VFS_NEXT_PWRITE(handle, fsp, fd, data, n, offset);
+}
+
static SMB_OFF_T skel_lseek(vfs_handle_struct *handle, files_struct *fsp, int filedes, SMB_OFF_T offset, int whence)
{
return SMB_VFS_NEXT_LSEEK(handle, fsp, filedes, offset, whence);