summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-12-06 01:29:49 +0000
committered <ed@FreeBSD.org>2009-12-06 01:29:49 +0000
commitbd0b02744c19a5bed3af17e17751df5b1f5d47ad (patch)
tree0fa5c562d4cee2082a78eb0b5e2ad6e838344e10
parent1112c6186a933d43332e13ebc8586f143070ae3e (diff)
downloadFreeBSD-src-bd0b02744c19a5bed3af17e17751df5b1f5d47ad.zip
FreeBSD-src-bd0b02744c19a5bed3af17e17751df5b1f5d47ad.tar.gz
Don't depend on <utmp.h>.
MAXLOGNAME seems more applicable in this case, because UT_NAMESIZE refers to the username field in utmp files, which is clearly unrelated to repquota(8).
-rw-r--r--usr.sbin/repquota/repquota.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/repquota/repquota.c b/usr.sbin/repquota/repquota.c
index 19c1858..b6d4be6 100644
--- a/usr.sbin/repquota/repquota.c
+++ b/usr.sbin/repquota/repquota.c
@@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <time.h>
#include <unistd.h>
-#include <utmp.h>
/* Let's be paranoid about block size */
#if 10 > DEV_BSHIFT
@@ -227,9 +226,9 @@ repquota(struct fstab *fs, int type, char *qfpathname)
}
fclose(qf);
printf("%*s Block limits File limits\n",
- max(UT_NAMESIZE,10), " ");
+ max(MAXLOGNAME-1,10), " ");
printf("%s%*s used soft hard grace used soft hard grace\n",
- type == USRQUOTA ? "User " : "Group", max(UT_NAMESIZE,10), " ");
+ type == USRQUOTA ? "User " : "Group", max(MAXLOGNAME-1,10), " ");
for (id = 0; id <= highid[type]; id++) {
fup = lookup(id, type);
if (fup == 0)
@@ -237,7 +236,7 @@ repquota(struct fstab *fs, int type, char *qfpathname)
if (fup->fu_dqblk.dqb_curinodes == 0 &&
fup->fu_dqblk.dqb_curblocks == 0)
continue;
- printf("%-*s ", max(UT_NAMESIZE,10), fup->fu_name);
+ printf("%-*s ", max(MAXLOGNAME-1,10), fup->fu_name);
printf("%c%c %8lu %8lu %8lu %6s",
fup->fu_dqblk.dqb_bsoftlimit &&
fup->fu_dqblk.dqb_curblocks >=
OpenPOWER on IntegriCloud