diff options
author | Jeremy Allison <jra@samba.org> | 2008-01-16 17:22:31 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-01-16 17:22:31 -0800 |
commit | 3020ec12a39276eaf3978323f4048b8a2e430bea (patch) | |
tree | 3f94c491760830fe4dd934fa09efd71e3c3cc4e8 /source3/modules | |
parent | 70426bdd307be2bbaa2ec6f111440bae69216933 (diff) | |
download | samba-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 'source3/modules')
-rw-r--r-- | source3/modules/vfs_default.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 3e78c69a5e..d4ba4dc611 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1225,35 +1225,42 @@ static int vfswrap_aio_suspend(struct vfs_handle_struct *handle, struct files_st return sys_aio_suspend(aiocb, n, timeout); } -static int vfswrap_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp) +static bool vfswrap_aio_force(struct vfs_handle_struct *handle, struct files_struct *fsp) { - return False; + return false; } -static int vfswrap_is_offline(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *path, SMB_STRUCT_STAT *sbuf, bool *offline) +static int vfswrap_is_offline(struct vfs_handle_struct *handle, const char *path, SMB_STRUCT_STAT *sbuf, bool *offline) { if (ISDOT(path) || ISDOTDOT(path)) { - return 1; + *offline = false; + return 0; } - - if (!lp_dmapi_support(SNUM(conn)) || !dmapi_have_session()) { + + if (!lp_dmapi_support(SNUM(handle->conn)) || !dmapi_have_session()) { +#if defined(ENOTSUP) + errno = ENOTSUP; +#endif return -1; } - + *offline = (dmapi_file_flags(path) & FILE_ATTRIBUTE_OFFLINE) != 0; return 0; } -static int vfswrap_set_offline(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *path) +static int vfswrap_set_offline(struct vfs_handle_struct *handle, const char *path) { /* We don't know how to set offline bit by default, needs to be overriden in the vfs modules */ +#if defined(ENOTSUP) + errno = ENOTSUP; +#endif return -1; } -static bool vfswrap_is_remotestorage(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *path) +static bool vfswrap_is_remotestorage(struct vfs_handle_struct *handle, const char *path) { /* We don't know how to detect that volume is remote storage. VFS modules should redefine it. */ - return False; + return false; } @@ -1476,14 +1483,14 @@ static vfs_op_tuple vfs_default_ops[] = { {SMB_VFS_OP(vfswrap_aio_force), SMB_VFS_OP_AIO_FORCE, SMB_VFS_LAYER_OPAQUE}, - + {SMB_VFS_OP(vfswrap_is_offline),SMB_VFS_OP_IS_OFFLINE, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_set_offline),SMB_VFS_OP_SET_OFFLINE, SMB_VFS_LAYER_OPAQUE}, {SMB_VFS_OP(vfswrap_is_remotestorage),SMB_VFS_OP_IS_REMOTESTORAGE, SMB_VFS_LAYER_OPAQUE}, - + /* Finish VFS operations definition */ {SMB_VFS_OP(NULL), SMB_VFS_OP_NOOP, |