summaryrefslogtreecommitdiffstats
path: root/source/smbd/vfs-wrap.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2003-05-14 14:38:11 +0000
committerAlexander Bokovoy <ab@samba.org>2003-05-14 14:38:11 +0000
commit3786695c72e6ff6a52a527382ac77142e236971b (patch)
tree55e79c0e4bb9d8e2028c978102d5f854ec6618cd /source/smbd/vfs-wrap.c
parentc2689ed118b490e49497a76ed6a2251262018769 (diff)
downloadsamba-3786695c72e6ff6a52a527382ac77142e236971b.tar.gz
samba-3786695c72e6ff6a52a527382ac77142e236971b.tar.xz
samba-3786695c72e6ff6a52a527382ac77142e236971b.zip
Evolve quotas configure check more. Patch from Stefan (metze) Metzemacher. Now we are defaulting to --with-quotas=no but anyway trying to test them in configure. This is done to get information about as much quota API variations as possible -- when --with-quotas=no this does not affect build but provides us with more detailed information on build farm.
Diffstat (limited to 'source/smbd/vfs-wrap.c')
-rw-r--r--source/smbd/vfs-wrap.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/smbd/vfs-wrap.c b/source/smbd/vfs-wrap.c
index 64e29bbe436..2160bca9f7d 100644
--- a/source/smbd/vfs-wrap.c
+++ b/source/smbd/vfs-wrap.c
@@ -758,20 +758,30 @@ int vfswrap_sys_acl_free_qualifier(vfs_handle_struct *handle, connection_struct
int vfswrap_get_quota(struct vfs_handle_struct *handle, struct connection_struct *conn, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt)
{
+#ifdef HAVE_SYS_QUOTAS
int result;
START_PROFILE(syscall_get_quota);
result = sys_get_quota(conn->connectpath, qtype, id, qt);
END_PROFILE(syscall_get_quota);
- return result;
+ return result;
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
}
int vfswrap_set_quota(struct vfs_handle_struct *handle, struct connection_struct *conn, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt)
{
+#ifdef HAVE_SYS_QUOTAS
int result;
START_PROFILE(syscall_set_quota);
result = sys_set_quota(conn->connectpath, qtype, id, qt);
END_PROFILE(syscall_set_quota);
- return result;
+ return result;
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
}