summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_media_harmony.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2017-06-02 15:26:06 -0700
committerJeremy Allison <jra@samba.org>2017-06-18 02:49:25 +0200
commit4ad426a7c6c9fffa41df5bcafd9f420c257b6805 (patch)
treeba663508bf4d4f21acba85cb2080268439e40c47 /source3/modules/vfs_media_harmony.c
parentfc92d451cf3162807e2493c62fa7617863adf2ba (diff)
downloadsamba-4ad426a7c6c9fffa41df5bcafd9f420c257b6805.tar.gz
s3: VFS: Change SMB_VFS_STATVFS to use const struct smb_filename * instead of const char *.
We need to migrate all pathname based VFS calls to use a struct to finish modernising the VFS with extra timestamp and flags parameters. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Diffstat (limited to 'source3/modules/vfs_media_harmony.c')
-rw-r--r--source3/modules/vfs_media_harmony.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c
index 2659b29c498..420b51f9910 100644
--- a/source3/modules/vfs_media_harmony.c
+++ b/source3/modules/vfs_media_harmony.c
@@ -632,36 +632,35 @@ out:
* Failure: set errno, return -1
*/
static int mh_statvfs(struct vfs_handle_struct *handle,
- const char *path,
+ const struct smb_filename *smb_fname,
struct vfs_statvfs_struct *statbuf)
{
int status;
- char *clientPath;
- TALLOC_CTX *ctx;
+ struct smb_filename *clientFname = NULL;
- DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n", path));
+ DEBUG(MH_INFO_DEBUG, ("Entering with path '%s'\n",
+ smb_fname->base_name));
- if (!is_in_media_files(path))
+ if (!is_in_media_files(smb_fname->base_name))
{
- status = SMB_VFS_NEXT_STATVFS(handle, path, statbuf);
+ status = SMB_VFS_NEXT_STATVFS(handle, smb_fname, statbuf);
goto out;
}
- clientPath = NULL;
- ctx = talloc_tos();
-
- if ((status = alloc_get_client_path(handle, ctx,
- path,
- &clientPath)))
- {
+ status = alloc_get_client_smb_fname(handle,
+ talloc_tos(),
+ smb_fname,
+ &clientFname);
+ if (status != 0) {
goto err;
}
- status = SMB_VFS_NEXT_STATVFS(handle, clientPath, statbuf);
+ status = SMB_VFS_NEXT_STATVFS(handle, clientFname, statbuf);
err:
- TALLOC_FREE(clientPath);
+ TALLOC_FREE(clientFname);
out:
- DEBUG(MH_INFO_DEBUG, ("Leaving with path '%s'\n", path));
+ DEBUG(MH_INFO_DEBUG, ("Leaving with path '%s'\n",
+ smb_fname->base_name));
return status;
}