diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/repquota/repquota.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/usr.sbin/repquota/repquota.c b/usr.sbin/repquota/repquota.c index d9bdc324daa..b662a753717 100644 --- a/usr.sbin/repquota/repquota.c +++ b/usr.sbin/repquota/repquota.c @@ -42,7 +42,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)repquota.c 8.1 (Berkeley) 6/6/93";*/ -static char *rcsid = "$Id: repquota.c,v 1.13 2001/01/14 23:03:05 angelos Exp $"; +static char *rcsid = "$Id: repquota.c,v 1.14 2001/01/15 05:19:10 angelos Exp $"; #endif /* not lint */ /* @@ -59,12 +59,6 @@ static char *rcsid = "$Id: repquota.c,v 1.13 2001/01/14 23:03:05 angelos Exp $"; #include <string.h> #include <errno.h> -#if DEV_BSHIFT < 10 -#define dbtokb(x) ((x) >> (10 - DEV_BSHIFT)) -#else -#define dbtokb(x) ((x) << (DEV_BSHIFT - 10)) -#endif - char *qfname = QUOTAFILENAME; char *qfextension[] = INITQFNAMES; @@ -232,16 +226,19 @@ repquota(fs, type, qfpathname) fup->fu_dqblk.dqb_curblocks == 0) continue; printf("%-10s", fup->fu_name); - printf("%c%c%8lu%8lu%8lu%7s", + printf("%c%c%8d%8d%8d%7s", fup->fu_dqblk.dqb_bsoftlimit && fup->fu_dqblk.dqb_curblocks >= fup->fu_dqblk.dqb_bsoftlimit ? '+' : '-', fup->fu_dqblk.dqb_isoftlimit && fup->fu_dqblk.dqb_curinodes >= fup->fu_dqblk.dqb_isoftlimit ? '+' : '-', - (int)(dbtokb((u_quad_t)fup->fu_dqblk.dqb_curblocks)), - (int)(dbtokb((u_quad_t)fup->fu_dqblk.dqb_bsoftlimit)), - (int)(dbtokb((u_quad_t)fup->fu_dqblk.dqb_bhardlimit)), + (int)(dbtob((u_quad_t)fup->fu_dqblk.dqb_curblocks) + / 1024), + (int)(dbtob((u_quad_t)fup->fu_dqblk.dqb_bsoftlimit) + / 1024), + (int)(dbtob((u_quad_t)fup->fu_dqblk.dqb_bhardlimit) + / 1024), fup->fu_dqblk.dqb_bsoftlimit && fup->fu_dqblk.dqb_curblocks >= fup->fu_dqblk.dqb_bsoftlimit ? |