9c0335
From a571f710b42f5ba76b5e577607b35a9076a76ba0 Mon Sep 17 00:00:00 2001
9c0335
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
9c0335
Date: Wed, 9 Mar 2011 17:52:33 +0100
9c0335
Subject: [PATCH] Reverse setgrace condition
9c0335
9c0335
Original idea is to disallow remote grace setting. The condition
9c0335
should be opposite. See
9c0335
https://sourceforge.net/tracker/index.php?func=detail&aid=3202953&group_id=18136&atid=118136
9c0335
---
9c0335
 setquota.c |    2 +-
9c0335
 1 files changed, 1 insertions(+), 1 deletions(-)
9c0335
9c0335
diff --git a/setquota.c b/setquota.c
9c0335
index fe29ec2..c012908 100644
9c0335
--- a/setquota.c
9c0335
+++ b/setquota.c
9c0335
@@ -379,7 +379,7 @@ static int setgraces(struct quota_handle **handles)
9c0335
 	int i, ret = 0;
9c0335
 
9c0335
 	for (i = 0; handles[i]; i++) {
9c0335
-		if (handles[i]->qh_ops->write_info) {
9c0335
+		if (!handles[i]->qh_ops->write_info) {
9c0335
 			errstr(_("Setting grace period on %s is not supported.\n"), handles[i]->qh_quotadev);
9c0335
 			ret = -1;
9c0335
 			continue;
9c0335
-- 
9c0335
1.7.4
9c0335