summaryrefslogtreecommitdiff
path: root/examples/VFS
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-16 17:22:31 -0800
committerJeremy Allison <jra@samba.org>2008-01-16 17:22:31 -0800
commit3020ec12a39276eaf3978323f4048b8a2e430bea (patch)
tree3f94c491760830fe4dd934fa09efd71e3c3cc4e8 /examples/VFS
parent70426bdd307be2bbaa2ec6f111440bae69216933 (diff)
downloadsamba-3020ec12a39276eaf3978323f4048b8a2e430bea.tar.gz
samba-3020ec12a39276eaf3978323f4048b8a2e430bea.tar.bz2
samba-3020ec12a39276eaf3978323f4048b8a2e430bea.zip
Fix the mess that ab just made of the new VFS code.
NEEDS MORE TESTING ! Jeremy. (This used to be commit bcc94aed6f03211866aa85753a90fece87846ba9)
Diffstat (limited to 'examples/VFS')
-rw-r--r--examples/VFS/skel_opaque.c28
-rw-r--r--examples/VFS/skel_transparent.c28
2 files changed, 54 insertions, 2 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 5b196af5eb..1c2fc45011 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -580,6 +580,26 @@ static int skel_aio_suspend(struct vfs_handle_struct *handle, struct files_struc
return vfswrap_aio_suspend(NULL, fsp, aiocb, n, ts);
}
+static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
+{
+ return vfswrap_aio_force(NULL, fsp);
+}
+
+static int skel_is_offline(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf, bool *offline)
+{
+ return vfswrap_set_offline(NULL, path, sbuf, offline);
+}
+
+static int skel_set_offline(struct vfs_handle_struct *handle, const char *path)
+{
+ return vfswrap_set_offline(NULL, path);
+}
+
+static bool skel_is_remotestorage(struct vfs_handle_struct *handle, const char *path)
+{
+ return vfswrap_is_remotestorage(NULL, path);
+}
+
/* VFS operations structure */
static vfs_op_tuple skel_op_tuples[] = {
@@ -676,7 +696,7 @@ static vfs_op_tuple skel_op_tuples[] = {
{SMB_VFS_OP(skel_sys_acl_free_text), SMB_VFS_OP_SYS_ACL_FREE_TEXT, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_sys_acl_free_acl), SMB_VFS_OP_SYS_ACL_FREE_ACL, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_sys_acl_free_qualifier), SMB_VFS_OP_SYS_ACL_FREE_QUALIFIER, SMB_VFS_LAYER_OPAQUE},
-
+
/* EA operations. */
{SMB_VFS_OP(skel_getxattr), SMB_VFS_OP_GETXATTR, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_lgetxattr), SMB_VFS_OP_LGETXATTR, SMB_VFS_LAYER_OPAQUE},
@@ -699,6 +719,12 @@ static vfs_op_tuple skel_op_tuples[] = {
{SMB_VFS_OP(skel_aio_error), SMB_VFS_OP_AIO_ERROR, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_aio_fsync), SMB_VFS_OP_AIO_FSYNC, SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(skel_aio_suspend), SMB_VFS_OP_AIO_SUSPEND, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_aio_force), SMB_VFS_OP_AIO_FORCE, SMB_VFS_LAYER_OPAQUE},
+
+ /* offline operations */
+ {SMB_VFS_OP(skel_is_offline), SMB_VFS_OP_IS_OFFLINE, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_set_offline), SMB_VFS_OP_SET_OFFLINE, SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(skel_is_remotestorage), SMB_VFS_OP_IS_REMOTESTORAGE, SMB_VFS_LAYER_OPAQUE},
{NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 55407be10c..0a934976c4 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -539,6 +539,26 @@ static int skel_aio_suspend(struct vfs_handle_struct *handle, struct files_struc
return SMB_VFS_NEXT_AIO_SUSPEND(handle, fsp, aiocb, n, ts);
}
+static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp)
+{
+ return SMB_VFS_NEXT_AIO_FORCE(handle, fsp);
+}
+
+static int skel_is_offline(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf, bool *offline)
+{
+ return SMB_VFS_NEXT_IS_OFFLINE(handle, path, sbuf, offline);
+}
+
+static int skel_set_offline(struct vfs_handle_struct *handle, const char *path)
+{
+ return SMB_VFS_NEXT_SET_OFFLINE(handle, path);
+}
+
+static bool skel_is_remotestorage(struct vfs_handle_struct *handle, const char *path)
+{
+ return SMB_VFS_NEXT_IS_REMOTESTORAGE(handle, path);
+}
+
/* VFS operations structure */
static vfs_op_tuple skel_op_tuples[] = {
@@ -633,7 +653,7 @@ static vfs_op_tuple skel_op_tuples[] = {
{SMB_VFS_OP(skel_sys_acl_free_text), SMB_VFS_OP_SYS_ACL_FREE_TEXT, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(skel_sys_acl_free_acl), SMB_VFS_OP_SYS_ACL_FREE_ACL, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(skel_sys_acl_free_qualifier), SMB_VFS_OP_SYS_ACL_FREE_QUALIFIER, SMB_VFS_LAYER_TRANSPARENT},
-
+
/* EA operations. */
{SMB_VFS_OP(skel_getxattr), SMB_VFS_OP_GETXATTR, SMB_VFS_LAYER_TRANSPARENT},
{SMB_VFS_OP(skel_lgetxattr), SMB_VFS_OP_LGETXATTR, SMB_VFS_LAYER_TRANSPARENT},
@@ -656,6 +676,12 @@ static vfs_op_tuple skel_op_tuples[] = {
{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},
+ {SMB_VFS_OP(skel_aio_force), SMB_VFS_OP_AIO_FORCE, SMB_VFS_LAYER_TRANSPARENT},
+
+ /* offline operations */
+ {SMB_VFS_OP(skel_is_offline), SMB_VFS_OP_IS_OFFLINE, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(skel_set_offline), SMB_VFS_OP_SET_OFFLINE, SMB_VFS_LAYER_TRANSPARENT},
+ {SMB_VFS_OP(skel_is_remotestorage), SMB_VFS_OP_IS_REMOTESTORAGE, SMB_VFS_LAYER_TRANSPARENT},
{NULL, SMB_VFS_OP_NOOP, SMB_VFS_LAYER_NOOP}
};