summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorUri Simchoni <uri@samba.org>2016-01-10 13:29:25 +0200
committerMichael Adam <obnox@samba.org>2016-01-26 15:58:12 +0100
commitc464b9e46069a741014333135728a9342ffa45cb (patch)
treec8ab696528bf6629d24eadda0fd91dcffd885f6c /examples
parentf71761c47a4c3b160b60c25a56e01a7a887992ab (diff)
downloadsamba-c464b9e46069a741014333135728a9342ffa45cb.tar.gz
vfs: add path parameter to get_quota
Adding a path parameter would allow the VFS get_quota function to be used for determining the quota/usage when calculating size and free spacei. Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/VFS/skel_opaque.c5
-rw-r--r--examples/VFS/skel_transparent.c7
2 files changed, 7 insertions, 5 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 29fe6f44c21..a4309d4de69 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -54,8 +54,9 @@ static uint64_t skel_disk_free(vfs_handle_struct *handle, const char *path,
return 0;
}
-static int skel_get_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
- unid_t id, SMB_DISK_QUOTA *dq)
+static int skel_get_quota(vfs_handle_struct *handle, const char *path,
+ enum SMB_QUOTA_TYPE qtype, unid_t id,
+ SMB_DISK_QUOTA *dq)
{
errno = ENOSYS;
return -1;
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index c5a36a65a11..2d1ed790cbb 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -55,10 +55,11 @@ static uint64_t skel_disk_free(vfs_handle_struct *handle, const char *path,
return SMB_VFS_NEXT_DISK_FREE(handle, path, bsize, dfree, dsize);
}
-static int skel_get_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,
- unid_t id, SMB_DISK_QUOTA *dq)
+static int skel_get_quota(vfs_handle_struct *handle, const char *path,
+ enum SMB_QUOTA_TYPE qtype, unid_t id,
+ SMB_DISK_QUOTA *dq)
{
- return SMB_VFS_NEXT_GET_QUOTA(handle, qtype, id, dq);
+ return SMB_VFS_NEXT_GET_QUOTA(handle, path, qtype, id, dq);
}
static int skel_set_quota(vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype,