summaryrefslogtreecommitdiffstats
path: root/examples/VFS/skel_transparent.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/VFS/skel_transparent.c')
-rw-r--r--examples/VFS/skel_transparent.c56
1 files changed, 50 insertions, 6 deletions
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index b10161cde19..81069765d0e 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -70,9 +70,9 @@ static int skel_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fs
return SMB_VFS_NEXT_GET_SHADOW_COPY_DATA(handle, fsp, shadow_copy_data, labels);
}
-static DIR *skel_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname)
+static DIR *skel_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
{
- return SMB_VFS_NEXT_OPENDIR(handle, conn, fname);
+ return SMB_VFS_NEXT_OPENDIR(handle, conn, fname, mask, attr);
}
static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
@@ -145,9 +145,9 @@ static SMB_OFF_T skel_lseek(vfs_handle_struct *handle, files_struct *fsp, int fi
return SMB_VFS_NEXT_LSEEK(handle, fsp, filedes, offset, whence);
}
-static int skel_rename(vfs_handle_struct *handle, connection_struct *conn, const char *old, const char *new)
+static int skel_rename(vfs_handle_struct *handle, connection_struct *conn, const char *oldname, const char *newname)
{
- return SMB_VFS_NEXT_RENAME(handle, conn, old, new);
+ return SMB_VFS_NEXT_RENAME(handle, conn, oldname, newname);
}
static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp, int fd)
@@ -220,12 +220,12 @@ static BOOL skel_lock(vfs_handle_struct *handle, files_struct *fsp, int fd, int
return SMB_VFS_NEXT_LOCK(handle, fsp, fd, op, offset, count, type);
}
-static BOOL skel_symlink(vfs_handle_struct *handle, connection_struct *conn, const char *oldpath, const char *newpath)
+static int skel_symlink(vfs_handle_struct *handle, connection_struct *conn, const char *oldpath, const char *newpath)
{
return SMB_VFS_NEXT_SYMLINK(handle, conn, oldpath, newpath);
}
-static BOOL skel_readlink(vfs_handle_struct *handle, connection_struct *conn, const char *path, char *buf, size_t bufsiz)
+static int skel_readlink(vfs_handle_struct *handle, connection_struct *conn, const char *path, char *buf, size_t bufsiz)
{
return SMB_VFS_NEXT_READLINK(handle, conn, path, buf, bufsiz);
}
@@ -456,6 +456,41 @@ static int skel_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp,in
return SMB_VFS_NEXT_FSETXATTR(handle, fsp, fd, name, value, size, flags);
}
+static int skel_aio_read(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+{
+ return SMB_VFS_NEXT_AIO_READ(handle, fsp, aiocb);
+}
+
+static int skel_aio_write(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+{
+ return SMB_VFS_NEXT_AIO_WRITE(handle, fsp, aiocb);
+}
+
+static ssize_t skel_aio_return(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+{
+ return SMB_VFS_NEXT_AIO_RETURN(handle, fsp, aiocb);
+}
+
+static int skel_aio_cancel(struct vfs_handle_struct *handle, struct files_struct *fsp, int fd, SMB_STRUCT_AIOCB *aiocb)
+{
+ return SMB_VFS_NEXT_AIO_CANCEL(handle, fsp, fd, aiocb);
+}
+
+static int skel_aio_error(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_STRUCT_AIOCB *aiocb)
+{
+ return SMB_VFS_NEXT_AIO_ERROR(handle, fsp, aiocb);
+}
+
+static int skel_aio_fsync(struct vfs_handle_struct *handle, struct files_struct *fsp, int op, SMB_STRUCT_AIOCB *aiocb)
+{
+ return SMB_VFS_NEXT_AIO_FSYNC(handle, fsp, op, aiocb);
+}
+
+static int skel_aio_suspend(struct vfs_handle_struct *handle, struct files_struct *fsp, const SMB_STRUCT_AIOCB * const aiocb[], int n, const struct timespec *ts)
+{
+ return SMB_VFS_NEXT_AIO_SUSPEND(handle, fsp, aiocb, n, ts);
+}
+
/* VFS operations structure */
static vfs_op_tuple skel_op_tuples[] = {
@@ -557,6 +592,15 @@ static vfs_op_tuple skel_op_tuples[] = {
{SMB_VFS_OP(skel_lsetxattr), SMB_VFS_OP_LSETXATTR, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(skel_fsetxattr), SMB_VFS_OP_FSETXATTR, SMB_VFS_LAYER_TRANSPARENT},
+ /* AIO operations. */
+ {SMB_VFS_OP(skel_aio_read), SMB_VFS_OP_AIO_READ, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(skel_aio_write), SMB_VFS_OP_AIO_WRITE, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(skel_aio_return), SMB_VFS_OP_AIO_RETURN, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(skel_aio_cancel), SMB_VFS_OP_AIO_CANCEL, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(skel_aio_error), SMB_VFS_OP_AIO_ERROR, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(skel_aio_fsync), SMB_VFS_OP_AIO_FSYNC, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(skel_aio_suspend), SMB_VFS_OP_AIO_SUSPEND, SMB_VFS_LAYER_TRANSPARENT},
+
{NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};