summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pstat/pstat.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1995-05-14 03:08:35 +0000
committerdg <dg@FreeBSD.org>1995-05-14 03:08:35 +0000
commit05c46323f6173c1eb8c1ce21e9e6f492ee272de5 (patch)
tree5d0e197819cae19adea7c697450e1bf27d7c0649 /usr.sbin/pstat/pstat.c
parentb649d7b9c7fc4e854447610d77a8f589d6d879df (diff)
downloadFreeBSD-src-05c46323f6173c1eb8c1ce21e9e6f492ee272de5.zip
FreeBSD-src-05c46323f6173c1eb8c1ce21e9e6f492ee272de5.tar.gz
Updated to work with Poul-Henning's recent changes to the swap device
table. Reviewed by: John Dyson and David Greenman Submitted by: Poul-Henning Kamp
Diffstat (limited to 'usr.sbin/pstat/pstat.c')
-rw-r--r--usr.sbin/pstat/pstat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 3d40cb7..0b67c38 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -1013,6 +1013,7 @@ swapmode()
long blocksize, *perdev;
struct rlist head;
struct rlist *swaplist;
+ u_long ptr;
KGET(VM_NSWAP, nswap);
KGET(VM_NSWDEV, nswdev);
@@ -1021,7 +1022,8 @@ swapmode()
if ((sw = malloc(nswdev * sizeof(*sw))) == NULL ||
(perdev = malloc(nswdev * sizeof(*perdev))) == NULL)
err(1, "malloc");
- KGET1(VM_SWDEVT, sw, nswdev * sizeof(*sw), "swdevt");
+ KGET1(VM_SWDEVT, &ptr, sizeof ptr, "swdevt");
+ KGET2(ptr, sw, nswdev * sizeof(*sw), "*swdevt");
/* Count up swap space. */
nfree = 0;
OpenPOWER on IntegriCloud