From: fsgqa Date: Tue, 12 Nov 2002 09:34:57 +0000 (+0000) Subject: Test for quota support the same way the user tools do. X-Git-Tag: v1.1.0~1029 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d9bf55133a945cae7818160420171dcf1ba31e74;p=users%2Fhch%2Fxfstests-dev.git Test for quota support the same way the user tools do. --- diff --git a/src/feature.c b/src/feature.c index 5c5998bfc..9e9ade6b1 100644 --- a/src/feature.c +++ b/src/feature.c @@ -140,6 +140,9 @@ hasxfsquota(int type, int q, char *device) fs_quota_stat_t qstat; int qcmd; + if (q == 0) + return (access("/proc/fs/xfs/xqm", F_OK) < 0); + memset(&qstat, 0, sizeof(fs_quota_stat_t)); qcmd = QCMD(Q_XGETQSTAT, type); if (quotactl(qcmd, device, 0, (caddr_t)&qstat) < 0) { @@ -147,8 +150,6 @@ hasxfsquota(int type, int q, char *device) perror("quotactl"); return (1); } - else if (q == 0) - return (0); else if (q == XFS_QUOTA_UDQ_ENFD && qstat.qs_flags & XFS_QUOTA_UDQ_ENFD) return (0); else if (q == XFS_QUOTA_GDQ_ENFD && qstat.qs_flags & XFS_QUOTA_GDQ_ENFD)