Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/bouyer-quota2]: src Catch up with Q2V -> QL rename
details: https://anonhg.NetBSD.org/src/rev/248d90a8a86b
branches: bouyer-quota2
changeset: 761100:248d90a8a86b
user: bouyer <bouyer%NetBSD.org@localhost>
date: Mon Jan 31 15:26:31 2011 +0000
description:
Catch up with Q2V -> QL rename
diffstat:
usr.bin/quota/quota.c | 84 ++++++++++++++--------------
usr.sbin/edquota/edquota.c | 124 +++++++++++++++++++++---------------------
usr.sbin/repquota/repquota.c | 50 ++++++++--------
3 files changed, 129 insertions(+), 129 deletions(-)
diffs (truncated from 500 to 300 lines):
diff -r 5d01e4fb0239 -r 248d90a8a86b usr.bin/quota/quota.c
--- a/usr.bin/quota/quota.c Mon Jan 31 15:24:10 2011 +0000
+++ b/usr.bin/quota/quota.c Mon Jan 31 15:26:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: quota.c,v 1.33.2.5 2011/01/30 20:54:22 bouyer Exp $ */
+/* $NetBSD: quota.c,v 1.33.2.6 2011/01/31 15:26:31 bouyer Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)quota.c 8.4 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: quota.c,v 1.33.2.5 2011/01/30 20:54:22 bouyer Exp $");
+__RCSID("$NetBSD: quota.c,v 1.33.2.6 2011/01/31 15:26:31 bouyer Exp $");
#endif
#endif /* not lint */
@@ -346,33 +346,33 @@
quplist = getprivs(id, type);
for (qup = quplist; qup; qup = qup->next) {
if (!vflag &&
- qup->q2e.q2e_val[Q2V_BLOCK].q2v_softlimit == UQUAD_MAX &&
- qup->q2e.q2e_val[Q2V_BLOCK].q2v_hardlimit == UQUAD_MAX &&
- qup->q2e.q2e_val[Q2V_FILE].q2v_softlimit == UQUAD_MAX &&
- qup->q2e.q2e_val[Q2V_FILE].q2v_hardlimit == UQUAD_MAX)
+ qup->q2e.q2e_val[QL_BLOCK].q2v_softlimit == UQUAD_MAX &&
+ qup->q2e.q2e_val[QL_BLOCK].q2v_hardlimit == UQUAD_MAX &&
+ qup->q2e.q2e_val[QL_FILE].q2v_softlimit == UQUAD_MAX &&
+ qup->q2e.q2e_val[QL_FILE].q2v_hardlimit == UQUAD_MAX)
continue;
msgi = NULL;
- if (qup->q2e.q2e_val[Q2V_FILE].q2v_hardlimit &&
- qup->q2e.q2e_val[Q2V_FILE].q2v_cur >=
- qup->q2e.q2e_val[Q2V_FILE].q2v_hardlimit)
+ if (qup->q2e.q2e_val[QL_FILE].q2v_hardlimit &&
+ qup->q2e.q2e_val[QL_FILE].q2v_cur >=
+ qup->q2e.q2e_val[QL_FILE].q2v_hardlimit)
msgi = "File limit reached on";
- else if (qup->q2e.q2e_val[Q2V_FILE].q2v_softlimit &&
- qup->q2e.q2e_val[Q2V_FILE].q2v_cur >=
- qup->q2e.q2e_val[Q2V_FILE].q2v_softlimit) {
- if (qup->q2e.q2e_val[Q2V_FILE].q2v_time > now)
+ else if (qup->q2e.q2e_val[QL_FILE].q2v_softlimit &&
+ qup->q2e.q2e_val[QL_FILE].q2v_cur >=
+ qup->q2e.q2e_val[QL_FILE].q2v_softlimit) {
+ if (qup->q2e.q2e_val[QL_FILE].q2v_time > now)
msgi = "In file grace period on";
else
msgi = "Over file quota on";
}
msgb = NULL;
- if (qup->q2e.q2e_val[Q2V_BLOCK].q2v_hardlimit &&
- qup->q2e.q2e_val[Q2V_BLOCK].q2v_cur >=
- qup->q2e.q2e_val[Q2V_BLOCK].q2v_hardlimit)
+ if (qup->q2e.q2e_val[QL_BLOCK].q2v_hardlimit &&
+ qup->q2e.q2e_val[QL_BLOCK].q2v_cur >=
+ qup->q2e.q2e_val[QL_BLOCK].q2v_hardlimit)
msgb = "Block limit reached on";
- else if (qup->q2e.q2e_val[Q2V_BLOCK].q2v_softlimit &&
- qup->q2e.q2e_val[Q2V_BLOCK].q2v_cur >=
- qup->q2e.q2e_val[Q2V_BLOCK].q2v_softlimit) {
- if (qup->q2e.q2e_val[Q2V_BLOCK].q2v_time > now)
+ else if (qup->q2e.q2e_val[QL_BLOCK].q2v_softlimit &&
+ qup->q2e.q2e_val[QL_BLOCK].q2v_cur >=
+ qup->q2e.q2e_val[QL_BLOCK].q2v_softlimit) {
+ if (qup->q2e.q2e_val[QL_BLOCK].q2v_time > now)
msgb = "In block grace period on";
else
msgb = "Over block quota on";
@@ -388,8 +388,8 @@
continue;
}
if (vflag || dflag ||
- qup->q2e.q2e_val[Q2V_BLOCK].q2v_cur ||
- qup->q2e.q2e_val[Q2V_FILE].q2v_cur) {
+ qup->q2e.q2e_val[QL_BLOCK].q2v_cur ||
+ qup->q2e.q2e_val[QL_FILE].q2v_cur) {
if (lines++ == 0)
heading(type, id, name, "");
nam = qup->fsname;
@@ -399,40 +399,40 @@
}
if (msgb)
timemsg = timeprt(now,
- qup->q2e.q2e_val[Q2V_BLOCK].q2v_time, 8);
+ qup->q2e.q2e_val[QL_BLOCK].q2v_time, 8);
else if ((qup->flags & QUOTA2) != 0 && vflag)
timemsg = timeprt(0,
- qup->q2e.q2e_val[Q2V_BLOCK].q2v_grace, 8);
+ qup->q2e.q2e_val[QL_BLOCK].q2v_grace, 8);
else
- timemsg = NULL;
+ timemsg = "";
printf("%12s%9s%c%8s%9s%8s"
, nam
- , intprt(qup->q2e.q2e_val[Q2V_BLOCK].q2v_cur
+ , intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_cur
,HN_B, hflag, 8)
, (msgb == NULL) ? ' ' : '*'
- , intprt(qup->q2e.q2e_val[Q2V_BLOCK].q2v_softlimit
+ , intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_softlimit
, HN_B, hflag, 8)
- , intprt(qup->q2e.q2e_val[Q2V_BLOCK].q2v_hardlimit
+ , intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_hardlimit
, HN_B, hflag, 8)
, timemsg);
if (msgi)
timemsg = timeprt(now,
- qup->q2e.q2e_val[Q2V_FILE].q2v_time, 8);
+ qup->q2e.q2e_val[QL_FILE].q2v_time, 8);
else if ((qup->flags & QUOTA2) != 0 && vflag)
timemsg = timeprt(0,
- qup->q2e.q2e_val[Q2V_FILE].q2v_grace, 8);
+ qup->q2e.q2e_val[QL_FILE].q2v_grace, 8);
else
- timemsg = NULL;
+ timemsg = "";
printf("%8s%c%7s%8s%8s\n"
- , intprt(qup->q2e.q2e_val[Q2V_FILE].q2v_cur
+ , intprt(qup->q2e.q2e_val[QL_FILE].q2v_cur
, 0, hflag, 7)
, (msgi == NULL) ? ' ' : '*'
- , intprt(qup->q2e.q2e_val[Q2V_FILE].q2v_softlimit
+ , intprt(qup->q2e.q2e_val[QL_FILE].q2v_softlimit
, 0, hflag, 7)
- , intprt(qup->q2e.q2e_val[Q2V_FILE].q2v_hardlimit
+ , intprt(qup->q2e.q2e_val[QL_FILE].q2v_hardlimit
, 0, hflag, 7)
, timemsg);
continue;
@@ -593,26 +593,26 @@
case Q_OK:
gettimeofday(&tv, NULL);
/* blocks*/
- q2e->q2e_val[Q2V_BLOCK].q2v_hardlimit =
+ q2e->q2e_val[QL_BLOCK].q2v_hardlimit =
gq_rslt.getquota_rslt_u.gqr_rquota.rq_bhardlimit *
(gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize / DEV_BSIZE);
- q2e->q2e_val[Q2V_BLOCK].q2v_softlimit =
+ q2e->q2e_val[QL_BLOCK].q2v_softlimit =
gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsoftlimit *
(gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize / DEV_BSIZE);
- q2e->q2e_val[Q2V_BLOCK].q2v_cur =
+ q2e->q2e_val[QL_BLOCK].q2v_cur =
gq_rslt.getquota_rslt_u.gqr_rquota.rq_curblocks *
(gq_rslt.getquota_rslt_u.gqr_rquota.rq_bsize / DEV_BSIZE);
/* inodes */
- q2e->q2e_val[Q2V_FILE].q2v_hardlimit =
+ q2e->q2e_val[QL_FILE].q2v_hardlimit =
gq_rslt.getquota_rslt_u.gqr_rquota.rq_fhardlimit;
- q2e->q2e_val[Q2V_FILE].q2v_softlimit =
+ q2e->q2e_val[QL_FILE].q2v_softlimit =
gq_rslt.getquota_rslt_u.gqr_rquota.rq_fsoftlimit;
- q2e->q2e_val[Q2V_FILE].q2v_cur =
+ q2e->q2e_val[QL_FILE].q2v_cur =
gq_rslt.getquota_rslt_u.gqr_rquota.rq_curfiles;
/* grace times */
- q2e->q2e_val[Q2V_BLOCK].q2v_time =
+ q2e->q2e_val[QL_BLOCK].q2v_time =
tv.tv_sec + gq_rslt.getquota_rslt_u.gqr_rquota.rq_btimeleft;
- q2e->q2e_val[Q2V_FILE].q2v_time =
+ q2e->q2e_val[QL_FILE].q2v_time =
tv.tv_sec + gq_rslt.getquota_rslt_u.gqr_rquota.rq_ftimeleft;
*cp = ':';
return (1);
diff -r 5d01e4fb0239 -r 248d90a8a86b usr.sbin/edquota/edquota.c
--- a/usr.sbin/edquota/edquota.c Mon Jan 31 15:24:10 2011 +0000
+++ b/usr.sbin/edquota/edquota.c Mon Jan 31 15:26:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: edquota.c,v 1.29.16.5 2011/01/30 22:49:32 bouyer Exp $ */
+/* $NetBSD: edquota.c,v 1.29.16.6 2011/01/31 15:26:31 bouyer Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "from: @(#)edquota.c 8.3 (Berkeley) 4/27/95";
#else
-__RCSID("$NetBSD: edquota.c,v 1.29.16.5 2011/01/30 22:49:32 bouyer Exp $");
+__RCSID("$NetBSD: edquota.c,v 1.29.16.6 2011/01/31 15:26:31 bouyer Exp $");
#endif
#endif /* not lint */
@@ -188,8 +188,8 @@
exit(1);
protoprivs = getprivs(protoid, quotatype, fs, 0);
for (qup = protoprivs; qup; qup = qup->next) {
- qup->q2e.q2e_val[Q2V_BLOCK].q2v_time = 0;
- qup->q2e.q2e_val[Q2V_FILE].q2v_time = 0;
+ qup->q2e.q2e_val[QL_BLOCK].q2v_time = 0;
+ qup->q2e.q2e_val[QL_FILE].q2v_time = 0;
}
while (argc-- > 0) {
if ((id = getentry(*argv++, quotatype)) < 0)
@@ -237,16 +237,16 @@
curprivs = getprivs(0, quotatype, fs, 1);
for (lqup = curprivs; lqup; lqup = lqup->next) {
if (soft) {
- lqup->q2e.q2e_val[Q2V_BLOCK].q2v_softlimit = softb;
- lqup->q2e.q2e_val[Q2V_FILE].q2v_softlimit = softi;
+ lqup->q2e.q2e_val[QL_BLOCK].q2v_softlimit = softb;
+ lqup->q2e.q2e_val[QL_FILE].q2v_softlimit = softi;
}
if (hard) {
- lqup->q2e.q2e_val[Q2V_BLOCK].q2v_hardlimit = hardb;
- lqup->q2e.q2e_val[Q2V_FILE].q2v_hardlimit = hardi;
+ lqup->q2e.q2e_val[QL_BLOCK].q2v_hardlimit = hardb;
+ lqup->q2e.q2e_val[QL_FILE].q2v_hardlimit = hardi;
}
if (grace) {
- lqup->q2e.q2e_val[Q2V_BLOCK].q2v_grace = graceb;
- lqup->q2e.q2e_val[Q2V_FILE].q2v_grace = gracei;
+ lqup->q2e.q2e_val[QL_BLOCK].q2v_grace = graceb;
+ lqup->q2e.q2e_val[QL_FILE].q2v_grace = gracei;
}
}
putprivs(0, quotatype, curprivs);
@@ -260,25 +260,25 @@
for (lqup = curprivs; lqup; lqup = lqup->next) {
if (soft) {
if (softb &&
- lqup->q2e.q2e_val[Q2V_BLOCK].q2v_cur >= softb &&
- (lqup->q2e.q2e_val[Q2V_BLOCK].q2v_softlimit == 0 ||
- lqup->q2e.q2e_val[Q2V_BLOCK].q2v_cur < lqup->q2e.q2e_val[Q2V_BLOCK].q2v_softlimit))
- lqup->q2e.q2e_val[Q2V_BLOCK].q2v_time = 0;
+ lqup->q2e.q2e_val[QL_BLOCK].q2v_cur >= softb &&
+ (lqup->q2e.q2e_val[QL_BLOCK].q2v_softlimit == 0 ||
+ lqup->q2e.q2e_val[QL_BLOCK].q2v_cur < lqup->q2e.q2e_val[QL_BLOCK].q2v_softlimit))
+ lqup->q2e.q2e_val[QL_BLOCK].q2v_time = 0;
if (softi &&
- lqup->q2e.q2e_val[Q2V_FILE].q2v_cur >= softb &&
- (lqup->q2e.q2e_val[Q2V_FILE].q2v_softlimit == 0 ||
- lqup->q2e.q2e_val[Q2V_FILE].q2v_cur < lqup->q2e.q2e_val[Q2V_FILE].q2v_softlimit))
- lqup->q2e.q2e_val[Q2V_FILE].q2v_time = 0;
- lqup->q2e.q2e_val[Q2V_BLOCK].q2v_softlimit = softb;
- lqup->q2e.q2e_val[Q2V_FILE].q2v_softlimit = softi;
+ lqup->q2e.q2e_val[QL_FILE].q2v_cur >= softb &&
+ (lqup->q2e.q2e_val[QL_FILE].q2v_softlimit == 0 ||
+ lqup->q2e.q2e_val[QL_FILE].q2v_cur < lqup->q2e.q2e_val[QL_FILE].q2v_softlimit))
+ lqup->q2e.q2e_val[QL_FILE].q2v_time = 0;
+ lqup->q2e.q2e_val[QL_BLOCK].q2v_softlimit = softb;
+ lqup->q2e.q2e_val[QL_FILE].q2v_softlimit = softi;
}
if (hard) {
- lqup->q2e.q2e_val[Q2V_BLOCK].q2v_hardlimit = hardb;
- lqup->q2e.q2e_val[Q2V_FILE].q2v_hardlimit = hardi;
+ lqup->q2e.q2e_val[QL_BLOCK].q2v_hardlimit = hardb;
+ lqup->q2e.q2e_val[QL_FILE].q2v_hardlimit = hardi;
}
if (grace) {
- lqup->q2e.q2e_val[Q2V_BLOCK].q2v_grace = graceb;
- lqup->q2e.q2e_val[Q2V_FILE].q2v_grace = gracei;
+ lqup->q2e.q2e_val[QL_BLOCK].q2v_grace = graceb;
+ lqup->q2e.q2e_val[QL_FILE].q2v_grace = gracei;
}
}
putprivs(id, quotatype, curprivs);
@@ -696,29 +696,29 @@
for (qup = quplist; qup; qup = qup->next) {
fprintf(fd, "%s: %s %s, limits (soft = %s, hard = %s",
qup->fsname, "blocks in use:",
- intprt(qup->q2e.q2e_val[Q2V_BLOCK].q2v_cur,
+ intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_cur,
HN_NOSPACE | HN_B, Hflag, 20),
- intprt(qup->q2e.q2e_val[Q2V_BLOCK].q2v_softlimit,
+ intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_softlimit,
HN_NOSPACE | HN_B, Hflag, 20),
- intprt(qup->q2e.q2e_val[Q2V_BLOCK].q2v_hardlimit,
+ intprt(qup->q2e.q2e_val[QL_BLOCK].q2v_hardlimit,
HN_NOSPACE | HN_B, Hflag, 20));
if (qup->flags & (QUOTA2|DEFAULT)) {
fprintf(fd, ", grace = %s",
- timepprt(qup->q2e.q2e_val[Q2V_BLOCK].q2v_grace,
+ timepprt(qup->q2e.q2e_val[QL_BLOCK].q2v_grace,
Hflag, 20));
}
fprintf(fd, ")\n");
fprintf(fd, "%s %s, limits (soft = %s, hard = %s",
"\tinodes in use:",
- intprt(qup->q2e.q2e_val[Q2V_FILE].q2v_cur,
+ intprt(qup->q2e.q2e_val[QL_FILE].q2v_cur,
HN_NOSPACE, Hflag, 20),
- intprt(qup->q2e.q2e_val[Q2V_FILE].q2v_softlimit,
+ intprt(qup->q2e.q2e_val[QL_FILE].q2v_softlimit,
HN_NOSPACE, Hflag, 20),
- intprt(qup->q2e.q2e_val[Q2V_FILE].q2v_hardlimit,
+ intprt(qup->q2e.q2e_val[QL_FILE].q2v_hardlimit,
HN_NOSPACE, Hflag, 20));
if (qup->flags & (QUOTA2|DEFAULT)) {
fprintf(fd, ", grace = %s",
- timepprt(qup->q2e.q2e_val[Q2V_FILE].q2v_grace,
+ timepprt(qup->q2e.q2e_val[QL_FILE].q2v_grace,
Hflag, 20));
}
fprintf(fd, ")\n");
@@ -861,10 +861,10 @@
Home |
Main Index |
Thread Index |
Old Index