Date: Sun, 6 Dec 2009 01:29:49 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r200174 - head/usr.sbin/repquota Message-ID: <200912060129.nB61TnVw006054@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Sun Dec 6 01:29:49 2009 New Revision: 200174 URL: http://svn.freebsd.org/changeset/base/200174 Log: 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). Modified: head/usr.sbin/repquota/repquota.c Modified: head/usr.sbin/repquota/repquota.c ============================================================================== --- head/usr.sbin/repquota/repquota.c Sun Dec 6 01:27:28 2009 (r200173) +++ head/usr.sbin/repquota/repquota.c Sun Dec 6 01:29:49 2009 (r200174) @@ -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, cha } 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, cha 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 >=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912060129.nB61TnVw006054>