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 >=
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to