diff options
author | Alexander Bokovoy <ab@samba.org> | 2008-01-17 14:57:35 +0300 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2008-01-17 14:57:35 +0300 |
commit | 026a66abecea3e3a54cdbfb97129d5e65608e5df (patch) | |
tree | 549c3c1e1a715a020b4f3b1fa6160f6d2d071269 /source3/include | |
parent | 6de904b836f4fdf5b0b027a09554afe3c13e05ca (diff) | |
download | samba-026a66abecea3e3a54cdbfb97129d5e65608e5df.tar.gz samba-026a66abecea3e3a54cdbfb97129d5e65608e5df.tar.bz2 samba-026a66abecea3e3a54cdbfb97129d5e65608e5df.zip |
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.
(This used to be commit 75cc08661473cce62756fa062071bb2bc1fb39ec)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/vfs.h | 2 | ||||
-rw-r--r-- | source3/include/vfs_macros.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h index b0da7e81a5..da5494927e 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -413,7 +413,7 @@ struct vfs_ops { bool (*aio_force)(struct vfs_handle_struct *handle, struct files_struct *fsp); /* offline operations */ - int (*is_offline)(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf, bool *offline); + bool (*is_offline)(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf); int (*set_offline)(struct vfs_handle_struct *handle, const char *path); bool (*is_remotestorage)(struct vfs_handle_struct *handle, const char *path); diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index 39f245fa35..f7c7e7d623 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -141,7 +141,7 @@ #define SMB_VFS_AIO_FORCE(fsp) ((fsp)->conn->vfs.ops.aio_force((fsp)->conn->vfs.handles.aio_force,(fsp))) /* Offline operations */ -#define SMB_VFS_IS_OFFLINE(conn,path,sbuf,offline) ((conn)->vfs.ops.is_offline((conn)->vfs.handles.is_offline,(path),(sbuf),(offline))) +#define SMB_VFS_IS_OFFLINE(conn,path,sbuf) ((conn)->vfs.ops.is_offline((conn)->vfs.handles.is_offline,(path),(sbuf))) #define SMB_VFS_SET_OFFLINE(conn,path) ((conn)->vfs.ops.set_offline((conn)->vfs.handles.set_offline,(path))) #define SMB_VFS_IS_REMOTESTORAGE(conn,path) ((conn)->vfs.ops.is_remotestorage((conn)->vfs.handles.is_remotestorage,(path))) @@ -266,7 +266,7 @@ #define SMB_VFS_OPAQUE_AIO_FORCE(fsp) ((fsp)->conn->vfs_opaque.ops.aio_force((fsp)->conn->vfs_opaque.handles.aio_force,(fsp))) /* Offline operations */ -#define SMB_VFS_OPAQUE_IS_OFFLINE(conn,path,sbuf,offline) ((conn)->vfs_opaque.ops.is_offline((conn)->vfs_opaque.handles.is_offline,(path),(sbuf),(offline))) +#define SMB_VFS_OPAQUE_IS_OFFLINE(conn,path,sbuf) ((conn)->vfs_opaque.ops.is_offline((conn)->vfs_opaque.handles.is_offline,(path),(sbuf))) #define SMB_VFS_OPAQUE_SET_OFFLINE(conn,path) ((conn)->vfs_opaque.ops.set_offline((conn)->vfs_opaque.handles.set_offline,(path))) #define SMB_VFS_OPAQUE_IS_REMOTESTORAGE(conn,path) ((conn)->vfs_opaque.ops.is_remotestorage((conn)->vfs_opaque.handles.is_remotestorage,(path))) @@ -392,7 +392,7 @@ #define SMB_VFS_NEXT_AIO_FORCE(handle,fsp) ((handle)->vfs_next.ops.aio_force((handle)->vfs_next.handles.aio_force,(fsp))) /* Offline operations */ -#define SMB_VFS_NEXT_IS_OFFLINE(handle,path,sbuf,offline) ((handle)->vfs_next.ops.is_offline((handle)->vfs_next.handles.is_offline,(path),(sbuf),(offline))) +#define SMB_VFS_NEXT_IS_OFFLINE(handle,path,sbuf) ((handle)->vfs_next.ops.is_offline((handle)->vfs_next.handles.is_offline,(path),(sbuf))) #define SMB_VFS_NEXT_SET_OFFLINE(handle,path) ((handle)->vfs_next.ops.set_offline((handle)->vfs_next.handles.set_offline,(path))) #define SMB_VFS_NEXT_IS_REMOTESTORAGE(handle,path) ((handle)->vfs_next.ops.is_remotestorage((handle)->vfs_next.handles.is_remotestorage,(path))) |