summaryrefslogtreecommitdiffstats
path: root/usr.sbin/repquota
diff options
context:
space:
mode:
authorangelos <angelos@openbsd.org>2001-01-15 05:19:10 +0000
committerangelos <angelos@openbsd.org>2001-01-15 05:19:10 +0000
commit849373577f1829ff819d9001b37f1890c13cd2e7 (patch)
tree3ff3b86a82175873fe13da0389e52b1e9c28b174 /usr.sbin/repquota
parentRevert previous patch (I should stop believing Theo, esp. when he's (diff)
downloadwireguard-openbsd-849373577f1829ff819d9001b37f1890c13cd2e7.tar.xz
wireguard-openbsd-849373577f1829ff819d9001b37f1890c13cd2e7.zip
Revert previous patch.
Diffstat (limited to 'usr.sbin/repquota')
-rw-r--r--usr.sbin/repquota/repquota.c19
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 ?