summaryrefslogtreecommitdiff
path: root/quotaon_xfs.c
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2001-03-26 14:56:54 +0000
committerjkar8572 <jkar8572>2001-03-26 14:56:54 +0000
commitec1d4ef4651205d3815163d161edc538b5e4e665 (patch)
treec18081d14a33d4f2e9e6d16904f12cde2ff5bc81 /quotaon_xfs.c
parent869fe242340fefe0540fdcf51698ba4c3c8c07bb (diff)
Fixed bugs in XFS quota option detection.
Diffstat (limited to 'quotaon_xfs.c')
-rw-r--r--quotaon_xfs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/quotaon_xfs.c b/quotaon_xfs.c
index a3c0480..4252fcf 100644
--- a/quotaon_xfs.c
+++ b/quotaon_xfs.c
@@ -122,12 +122,13 @@ static int xfs_state_check(int qcmd, int type, int flags, char *dev, int root, i
static int xfs_onoff(char *dev, int type, int flags, int rootfs, int *xopts)
{
- int qoff, qcmd;
+ int qoff, qcmd, check;
qoff = (flags & STATEFLAG_OFF);
qcmd = qoff ? Q_XFS_QUOTAOFF : Q_XFS_QUOTAON;
- if (xfs_state_check(qcmd, type, flags, dev, rootfs, xopts) < 0)
- return 1;
+ check = xfs_state_check(qcmd, type, flags, dev, rootfs, xopts);
+ if (check != 1)
+ return (check < 0);
if (quotactl(QCMD(qcmd, type), dev, 0, (void *)xopts) < 0) {
fprintf(stderr, qoff ? "quotaoff: " : "quotaon: ");