summaryrefslogtreecommitdiffstats
path: root/usr.bin/vmstat
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-07-26 09:18:26 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-07-26 09:18:26 +0000
commita7afbdeb6b3e0e31aafe71f66df4094d54983247 (patch)
treea70cb65c6163eb86acdffb98d391e29c3b74ffc8 /usr.bin/vmstat
parent3d0d9c279434abf4d4775cb0a9605de4867d76d9 (diff)
downloadFreeBSD-src-a7afbdeb6b3e0e31aafe71f66df4094d54983247.zip
FreeBSD-src-a7afbdeb6b3e0e31aafe71f66df4094d54983247.tar.gz
Convert interrupt count from signed to unsigned and the total
from signed long to unsigned lon long. PR: 12808 Submitted by: Kevin Day toasty@dragondata.com Reviewed by: bde
Diffstat (limited to 'usr.bin/vmstat')
-rw-r--r--usr.bin/vmstat/vmstat.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index ae3f0f4..c67a1eb 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)vmstat.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id: vmstat.c,v 1.34 1999/05/10 00:33:32 imp Exp $";
+ "$Id: vmstat.c,v 1.35 1999/05/12 11:49:47 bde Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -765,7 +765,8 @@ cpustats()
void
dointr()
{
- register long *intrcnt, inttotal, uptime;
+ register u_long *intrcnt, uptime;
+ register u_int64_t inttotal;
register int nintr, inamlen;
register char *intrname;
@@ -784,12 +785,13 @@ dointr()
nintr /= sizeof(long);
while (--nintr >= 0) {
if (*intrcnt)
- (void)printf("%-12s %8ld %8ld\n", intrname,
+ (void)printf("%-12s %8lu %8lu\n", intrname,
*intrcnt, *intrcnt / uptime);
intrname += strlen(intrname) + 1;
inttotal += *intrcnt++;
}
- (void)printf("Total %8ld %8ld\n", inttotal, inttotal / uptime);
+ (void)printf("Total %8llu %8llu\n", inttotal,
+ inttotal / (u_int64_t) uptime);
}
#define MAX_KMSTATS 200
OpenPOWER on IntegriCloud