From e129384d7c1df664e447186673dd107e190e2894 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Mon, 22 Jun 2009 15:26:56 -0700 Subject: s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTAT This patch introduces two new temporary helper functions vfs_stat_smb_fname and vfs_lstat_smb_fname. They basically allowed me to call the new smb_filename version of stat, while avoiding plumbing it through callers that are still too inconvenient. As the conversion moves along, I will be able to remove callers of this, with the goal being to remove all callers. There was also a bug in create_synthetic_smb_fname_split (also a temporary utility function) that caused it to incorrectly handle filenames with ':'s in them when in posix mode. This is now fixed. --- examples/VFS/skel_opaque.c | 8 ++++---- examples/VFS/skel_transparent.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'examples') diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index d1000f15b9..ee8a3d8f71 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -179,9 +179,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) @@ -189,9 +189,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) diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index 101951b0f9..10b10b88d6 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -172,9 +172,9 @@ static int skel_fsync(vfs_handle_struct *handle, files_struct *fsp) return SMB_VFS_NEXT_FSYNC(handle, 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 SMB_VFS_NEXT_STAT(handle, fname, sbuf); + return SMB_VFS_NEXT_STAT(handle, smb_fname); } static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_STAT *sbuf) @@ -182,9 +182,9 @@ static int skel_fstat(vfs_handle_struct *handle, files_struct *fsp, SMB_STRUCT_S return SMB_VFS_NEXT_FSTAT(handle, 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 SMB_VFS_NEXT_LSTAT(handle, path, sbuf); + return SMB_VFS_NEXT_LSTAT(handle, smb_fname); } static int skel_unlink(vfs_handle_struct *handle, const char *path) -- cgit