summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2012-09-02 21:44:54 +0200
committerBjörn Jacke <bj@sernet.de>2012-09-02 21:44:54 +0200
commit9dd0e1608ecc7a06873cbef6b81c951868bd0356 (patch)
treeb73e0cecb561227733c259c504968215a5f3dc4b /source3/smbd
parentaf5dcaa7405b7e5f67acacece96690da03ae9e5a (diff)
downloadsamba-9dd0e1608ecc7a06873cbef6b81c951868bd0356.tar.gz
samba-9dd0e1608ecc7a06873cbef6b81c951868bd0356.tar.bz2
samba-9dd0e1608ecc7a06873cbef6b81c951868bd0356.zip
s3: remove some duplicate quota code
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/quotas.c39
1 files changed, 12 insertions, 27 deletions
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
index caf02445dc..d8bdb0225c 100644
--- a/source3/smbd/quotas.c
+++ b/source3/smbd/quotas.c
@@ -51,6 +51,7 @@ bool disk_quotas_vxfs(const char *name, char *path, uint64_t *bsize, uint64_t *d
#endif /* VXFS_QUOTA */
+
#ifdef LINUX
#include <sys/types.h>
@@ -87,15 +88,6 @@ typedef struct _LINUX_SMB_DISK_QUOTA {
#endif
#include <rpc/xdr.h>
-static int my_xdr_getquota_args(XDR *xdrsp, struct getquota_args *args)
-{
- if (!xdr_string(xdrsp, &args->gqa_pathp, RQ_PATHLEN ))
- return(0);
- if (!xdr_int(xdrsp, &args->gqa_uid))
- return(0);
- return (1);
-}
-
static int my_xdr_getquota_rslt(XDR *xdrsp, struct getquota_rslt *gqr)
{
int quotastat;
@@ -613,15 +605,6 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
#include <rpc/nettype.h>
#include <rpc/xdr.h>
-static int my_xdr_getquota_args(XDR *xdrsp, struct getquota_args *args)
-{
- if (!xdr_string(xdrsp, &args->gqa_pathp, RQ_PATHLEN ))
- return(0);
- if (!xdr_int(xdrsp, &args->gqa_uid))
- return(0);
- return (1);
-}
-
static int my_xdr_getquota_rslt(XDR *xdrsp, struct getquota_rslt *gqr)
{
int quotastat;
@@ -1170,15 +1153,6 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
#endif
#include <rpc/xdr.h>
-static int my_xdr_getquota_args(XDR *xdrsp, struct getquota_args *args)
-{
- if (!xdr_string(xdrsp, &args->gqa_pathp, RQ_PATHLEN ))
- return(0);
- if (!xdr_int(xdrsp, &args->gqa_uid))
- return(0);
- return (1);
-}
-
static int my_xdr_getquota_rslt(XDR *xdrsp, struct getquota_rslt *gqr)
{
int quotastat;
@@ -1511,6 +1485,17 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d
#endif
+#if definedr(LINUX) || defined(SUNOS) || defined (__FreeBSD__) || defined(__DragonFly__)
+static int my_xdr_getquota_args(XDR *xdrsp, struct getquota_args *args)
+{
+ if (!xdr_string(xdrsp, &args->gqa_pathp, RQ_PATHLEN ))
+ return(0);
+ if (!xdr_int(xdrsp, &args->gqa_uid))
+ return(0);
+ return (1);
+}
+#endif
+
#if defined(VXFS_QUOTA)
/****************************************************************************