summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2008-01-17 14:57:35 +0300
committerAlexander Bokovoy <ab@samba.org>2008-01-17 14:57:35 +0300
commit75cc08661473cce62756fa062071bb2bc1fb39ec (patch)
tree58fe062a5ababc7ee34b3453cae375588b52fd87 /examples
parente1f5a8f10795831d3c7902d9803c9571c8ac811a (diff)
downloadsamba-75cc08661473cce62756fa062071bb2bc1fb39ec.tar.gz
Rework of VFS is_offline() function to only return boolean offline/online result for a file.
This makes sense as upper levels are only taking returned result of 0 (no error) into consideration when deciding whether to mark file offline/online as returned from is_offline. That means that we simply can move the decision down to VFS module and clean up upper levels so that they always see only file status. If there is an error when trying to identify file status, then VFS module could decide what to return (offline or online) by itself -- after all, it ought to have system-specific knowledge anyway.
Diffstat (limited to 'examples')
-rw-r--r--examples/VFS/skel_opaque.c4
-rw-r--r--examples/VFS/skel_transparent.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 1c2fc450118..42154c47a66 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -585,9 +585,9 @@ static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct
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)
+static bool skel_is_offline(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf)
{
- return vfswrap_set_offline(NULL, path, sbuf, offline);
+ return vfswrap_is_offline(NULL, path, sbuf);
}
static int skel_set_offline(struct vfs_handle_struct *handle, const char *path)
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 0a934976c45..997783819c0 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -544,9 +544,9 @@ static bool skel_aio_force(struct vfs_handle_struct *handle, struct files_struct
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)
+static bool skel_is_offline(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf)
{
- return SMB_VFS_NEXT_IS_OFFLINE(handle, path, sbuf, offline);
+ return SMB_VFS_NEXT_IS_OFFLINE(handle, path, sbuf);
}
static int skel_set_offline(struct vfs_handle_struct *handle, const char *path)