summaryrefslogtreecommitdiff
path: root/usr.sbin/repquota
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-15 05:19:11 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-01-15 05:19:11 +0000
commit19dfbbd2c1a397ab44212fba622191c6ae103e9d (patch)
treeb719446b2e26a2aea44d50772730f21cc3ca3568 /usr.sbin/repquota
parentf71eb56ce0129eb10a2fa7145408d264743afd7b (diff)
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 ?