svn commit: r185563 - head/usr.bin/procstat

Peter Wemm peter at FreeBSD.org
Tue Dec 2 07:08:33 PST 2008


Author: peter
Date: Tue Dec  2 15:08:33 2008
New Revision: 185563
URL: http://svn.freebsd.org/changeset/base/185563

Log:
  Update format string for kve_start/end.

Modified:
  head/usr.bin/procstat/procstat_vm.c

Modified: head/usr.bin/procstat/procstat_vm.c
==============================================================================
--- head/usr.bin/procstat/procstat_vm.c	Tue Dec  2 14:57:48 2008	(r185562)
+++ head/usr.bin/procstat/procstat_vm.c	Tue Dec  2 15:08:33 2008	(r185563)
@@ -34,6 +34,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <libutil.h>
 
 #include "procstat.h"
@@ -56,8 +57,8 @@ procstat_vm(pid_t pid, struct kinfo_proc
 	for (i = 0; i < cnt; i++) {
 		kve = &freep[i];
 		printf("%5d ", pid);
-		printf("%*p ", ptrwidth, kve->kve_start);
-		printf("%*p ", ptrwidth, kve->kve_end);
+		printf("%#*jx ", ptrwidth, (uintmax_t)kve->kve_start);
+		printf("%#*jx ", ptrwidth, (uintmax_t)kve->kve_end);
 		printf("%s", kve->kve_protection & KVME_PROT_READ ? "r" : "-");
 		printf("%s", kve->kve_protection & KVME_PROT_WRITE ? "w" : "-");
 		printf("%s ", kve->kve_protection & KVME_PROT_EXEC ? "x" : "-");


More information about the svn-src-all mailing list