s3: Plumb smb_filename through SMB_VFS_RENAME
[samba.git] / examples / VFS / skel_opaque.c
index 118a5b9da7b888b274d365a8a84f291f36b03e5b..5d05be9aabb0b2ffee21bf9a774ac5e19038bae6 100644 (file)
@@ -122,9 +122,10 @@ static int skel_closedir(vfs_handle_struct *handle,  SMB_STRUCT_DIR *dir)
        return vfswrap_closedir(NULL,  dir);
 }
 
-static int skel_open(vfs_handle_struct *handle,  const char *fname, files_struct *fsp, int flags, mode_t mode)
+static int skel_open(vfs_handle_struct *handle,  struct smb_fname *smb_fname,
+                    files_struct *fsp, int flags, mode_t mode)
 {
-       return vfswrap_open(NULL,  fname, flags, mode);
+       return vfswrap_open(NULL, smb_fname, flags, mode);
 }
 
 static int skel_close(vfs_handle_struct *handle, files_struct *fsp)
@@ -168,9 +169,11 @@ static ssize_t skel_recvfile(vfs_handle_struct *handle, int fromfd, files_struct
        return vfswrap_recvfile(NULL, fromfd, tofsp, offset, n);
 }
 
-static int skel_rename(vfs_handle_struct *handle,  const char *oldname, const char *newname)
+static int skel_rename(vfs_handle_struct *handle,
+                      const smb_filename *smb_fname_src,
+                      const smb_filename *smb_fname_dst)
 {
-       return vfswrap_rename(NULL,  oldname, newname);
+       return vfswrap_rename(NULL, smb_fname_src, smb_fname_dst);
 }
 
 static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp)
@@ -178,9 +181,9 @@ static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp)
        return vfswrap_fsync(NULL, fsp);
 }
 
-static int skel_stat(vfs_handle_struct *handle,  const char *fname, SMB_STRUCT_STAT *sbuf)
+static int skel_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
 {
-       return vfswrap_stat(NULL,  fname, sbuf);
+       return vfswrap_stat(NULL, smb_fname);
 }
 
 static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_STAT *sbuf)
@@ -188,9 +191,9 @@ static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_S
        return vfswrap_fstat(NULL, fsp, sbuf);
 }
 
-static int skel_lstat(vfs_handle_struct *handle,  const char *path, SMB_STRUCT_STAT *sbuf)
+static int skel_lstat(vfs_handle_struct *handle, struct smb_filename *smb_fname)
 {
-       return vfswrap_lstat(NULL,  path, sbuf);
+       return vfswrap_lstat(NULL, smb_fname);
 }
 
 static int skel_unlink(vfs_handle_struct *handle,  const char *path)