summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pstat
diff options
context:
space:
mode:
authoruwe <uwe@openbsd.org>2006-03-26 16:49:17 +0000
committeruwe <uwe@openbsd.org>2006-03-26 16:49:17 +0000
commit6ebda6470e6d6ce13a5f6faab9af02d6ee55cca4 (patch)
treebdd41140c31089cd82783336298b689007945e62 /usr.sbin/pstat
parentSet the width of address columns based on the machine word width. (diff)
downloadwireguard-openbsd-6ebda6470e6d6ce13a5f6faab9af02d6ee55cca4.tar.xz
wireguard-openbsd-6ebda6470e6d6ce13a5f6faab9af02d6ee55cca4.zip
Back out -r1.59. I did not follow the process.
Diffstat (limited to 'usr.sbin/pstat')
-rw-r--r--usr.sbin/pstat/pstat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 1659992ec47..a17e15692e4 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pstat.c,v 1.59 2006/03/26 15:04:10 uwe Exp $ */
+/* $OpenBSD: pstat.c,v 1.60 2006/03/26 16:49:17 uwe Exp $ */
/* $NetBSD: pstat.c,v 1.27 1996/10/23 22:50:06 cgd Exp $ */
/*-
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
from: static char sccsid[] = "@(#)pstat.c 8.9 (Berkeley) 2/16/94";
#else
-static char *rcsid = "$OpenBSD: pstat.c,v 1.59 2006/03/26 15:04:10 uwe Exp $";
+static char *rcsid = "$OpenBSD: pstat.c,v 1.60 2006/03/26 16:49:17 uwe Exp $";
#endif
#endif /* not lint */
@@ -277,7 +277,7 @@ vnodemode(void)
void
vnode_header(void)
{
- (void)printf("%*s TYP VFLAG USE HOLD", 2 * sizeof(long), "ADDR");
+ (void)printf("ADDR TYP VFLAG USE HOLD");
}
void
@@ -341,7 +341,7 @@ vnode_print(struct vnode *avnode, struct vnode *vp)
if (flag == 0)
*fp++ = '-';
*fp = '\0';
- (void)printf("%*lx %s %5s %4d %4u", 2 * sizeof(long),
+ (void)printf("%8lx %s %5s %4d %4u",
(long)avnode, type, flags, vp->v_usecount, vp->v_holdcnt);
}
@@ -918,12 +918,12 @@ filemode(void)
(void)printf("%d/%d open files\n", nfile, maxfile);
(void)printf("%*s TYPE FLG CNT MSG %*s OFFSET\n",
- 2 * sizeof(long), "LOC", 2 * sizeof(long), "DATA");
+ 8, "LOC", 8, "DATA");
for (; (char *)ffp < buf + len; addr = LIST_NEXT(ffp, f_list), ffp++) {
memmove(&fp, ffp, sizeof fp);
if ((unsigned)fp.f_type > DTYPE_SOCKET)
continue;
- (void)printf("%*lx ", 2 * sizeof(long), (long)addr);
+ (void)printf("%lx ", (long)addr);
(void)printf("%-8.8s", dtypes[fp.f_type]);
fbp = flagbuf;
if (fp.f_flag & FREAD)
@@ -939,7 +939,7 @@ filemode(void)
*fbp = '\0';
(void)printf("%6s %3ld", flagbuf, fp.f_count);
(void)printf(" %3ld", fp.f_msgcount);
- (void)printf(" %*.1lx", 2 * sizeof(long), (long)fp.f_data);
+ (void)printf(" %8.1lx", (long)fp.f_data);
if (fp.f_offset < 0)
(void)printf(" %llx\n", (long long)fp.f_offset);