From e3be771f24cb427be298e0d463ebf2f3a7704d15 Mon Sep 17 00:00:00 2001 From: Uri Simchoni Date: Sun, 13 Mar 2016 07:17:23 +0200 Subject: build: improve comments in tests/oldquotas.c Add comments to #else and #endif Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Mar 15 02:18:15 CET 2016 on sn-devel-144 --- tests/oldquotas.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/oldquotas.c b/tests/oldquotas.c index bdb2bebb075..0aacf2363c2 100644 --- a/tests/oldquotas.c +++ b/tests/oldquotas.c @@ -8,11 +8,11 @@ /* just a quick hack because sysquotas.h is included before linux/quota.h */ #ifdef QUOTABLOCK_SIZE #undef QUOTABLOCK_SIZE -#endif +#endif /* defined(QUOTABLOCK_SIZE) */ #ifdef WITH_QUOTAS -#if defined(VXFS_QUOTA) +#if defined(VXFS_QUOTA) /* Veritas VxFS for Solaris 2 */ bool disk_quotas_vxfs(const char *name, char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize); @@ -23,16 +23,16 @@ bool disk_quotas_vxfs(const char *name, char *path, uint64_t *bsize, #include #include -#if defined(SUNOS5) +#if defined(SUNOS5) /* Solaris */ #include #include #include -#else /* defined(SUNOS4) */ +#else /* SunOS4 */ #include #include -#endif +#endif /* Solaris */ -#if defined(SUNOS5) +#if defined(SUNOS5) /* Solaris */ /**************************************************************************** Allows querying of remote hosts for quotas on NFS mounted shares. @@ -53,7 +53,7 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, clnt = clnt_create("host", RQUOTAPROG, RQUOTAVERS, "udp"); return true; } -#endif +#endif /* Solaris */ /**************************************************************************** try to get the disk space from disk quotas (SunOS & Solaris2 version) @@ -64,29 +64,29 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize) { int ret; -#if defined(SUNOS5) +#if defined(SUNOS5) /* Solaris */ struct quotctl command; #else /* SunOS4 */ struct mntent *mnt; -#endif -#if defined(SUNOS5) +#endif /* Solaris */ +#if defined(SUNOS5) /* Solaris */ nfs_quotas("", 0, bsize, dfree, dsize); command.op = Q_GETQUOTA; command.uid = 0; command.addr = NULL; ret = ioctl(1, Q_QUOTACTL, &command); -#else +#else /* SunOS4 */ ret = quotactl(Q_GETQUOTA, "", 0, NULL); -#endif +#endif /* Solaris */ -#if defined(SUNOS5) && defined(VXFS_QUOTA) +#if defined(SUNOS5) && defined(VXFS_QUOTA) /* Solaris 2 VxFS */ disk_quotas_vxfs("", path, bsize, dfree, dsize); -#endif +#endif /* Solaris 2 VxFS */ return true; } -#else +#else /* not SunOS / Solaris */ #if AIX /* AIX quota patch from Ole Holm Nielsen */ @@ -99,10 +99,10 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, #include #include #endif /* AIX 5.3 */ -#else /* !AIX */ +#else /* !AIX - HP-UX */ #include #include -#endif +#endif /* AIX */ /**************************************************************************** try to get the disk space from disk quotas - default version @@ -124,9 +124,9 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, return (true); } -#endif +#endif /* SunOS / Solaris */ -#if defined(VXFS_QUOTA) +#if defined(VXFS_QUOTA) /* Veritas for Solaris 2 */ #if defined(SUNOS5) @@ -155,7 +155,7 @@ bool disk_quotas_vxfs(const char *name, char *path, uint64_t *bsize, return true; } -#endif /* SUNOS5 || ... */ +#endif /* SUNOS5 */ #endif /* VXFS_QUOTA */ -- cgit v1.2.1