summaryrefslogtreecommitdiff
path: root/repquota.c
diff options
context:
space:
mode:
authorjkar8572 <jkar8572>2001-12-12 15:08:00 +0000
committerjkar8572 <jkar8572>2001-12-12 15:08:00 +0000
commite99e7c28be649175c28f31322d34f6efb262ebed (patch)
treec0cdf98895e64150241165e9fc9ef4e14a4b165b /repquota.c
parent8a6a9af4403a6919d9d4994e51f5f4db6e694f88 (diff)
Updated repquota not to show grace times when softlimit is not exceeded.
Diffstat (limited to 'repquota.c')
-rw-r--r--repquota.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/repquota.c b/repquota.c
index f46350d..0197ff3 100644
--- a/repquota.c
+++ b/repquota.c
@@ -133,7 +133,10 @@ static void print(struct dquot *dquot, char *name)
sstrncpy(pname, name, sizeof(pname));
if (flags & FL_TRUNCNAMES)
pname[PRINTNAMELEN] = 0;
- difftime2str(entry->dqb_btime, time);
+ if (entry->dqb_bsoftlimit && toqb(entry->dqb_curspace) >= entry->dqb_bsoftlimit)
+ difftime2str(entry->dqb_btime, time);
+ else
+ time[0] = 0;
space2str(toqb(entry->dqb_curspace), numbuf[0], flags & FL_SHORTNUMS);
space2str(entry->dqb_bsoftlimit, numbuf[1], flags & FL_SHORTNUMS);
space2str(entry->dqb_bhardlimit, numbuf[2], flags & FL_SHORTNUMS);
@@ -141,7 +144,10 @@ static void print(struct dquot *dquot, char *name)
overlim(qb2kb(toqb(entry->dqb_curspace)), qb2kb(entry->dqb_bsoftlimit), qb2kb(entry->dqb_bhardlimit)),
overlim(entry->dqb_curinodes, entry->dqb_isoftlimit, entry->dqb_ihardlimit),
numbuf[0], numbuf[1], numbuf[2], time);
- difftime2str(entry->dqb_itime, time);
+ if (entry->dqb_isoftlimit && entry->dqb_curinodes >= entry->dqb_isoftlimit)
+ difftime2str(entry->dqb_itime, time);
+ else
+ time[0] = 0;
number2str(entry->dqb_curinodes, numbuf[0], flags & FL_SHORTNUMS);
number2str(entry->dqb_isoftlimit, numbuf[1], flags & FL_SHORTNUMS);
number2str(entry->dqb_ihardlimit, numbuf[2], flags & FL_SHORTNUMS);