From 4e3656b8d1d0bf8c0c4ade01332e7384ea890810 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Tue, 16 Jun 2009 12:01:13 -0700 Subject: s3: Change SMB_VFS_OPEN to take an smb_filename struct This was a little messy because of all of the vfs modules I had to touch. Most of them were pretty straight forward, but the streams modules required a little attention to handle smb_filename. Since the use of smb_filename enables the vfs modules to access the raw, over-the-wire stream, a little bit of the handling that was being done by split_ntfs_stream_name has now been shifted into the individual stream modules. It may be a little more code, but overall it gives more flexibility to the streams modules, while also allowing correct stream handling. --- examples/VFS/skel_opaque.c | 5 +++-- examples/VFS/skel_transparent.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 118a5b9da7..d1000f15b9 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -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) diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index a95b5ae6cd..101951b0f9 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -116,9 +116,10 @@ static int skel_closedir(vfs_handle_struct *handle, SMB_STRUCT_DIR *dir) return SMB_VFS_NEXT_CLOSEDIR(handle, 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_filename *smb_fname, + files_struct *fsp, int flags, mode_t mode) { - return SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode); + return SMB_VFS_NEXT_OPEN(handle, smb_fname, fsp, flags, mode); } static int skel_close(vfs_handle_struct *handle, files_struct *fsp) -- cgit