aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/swapinfo
diff options
context:
space:
mode:
authorDavid Greenman <dg@FreeBSD.org>1994-10-09 07:45:58 +0000
committerDavid Greenman <dg@FreeBSD.org>1994-10-09 07:45:58 +0000
commitceff08fff557c3381cc8017e79bf32b6c92389ab (patch)
tree79f043890f1e2c1f65fb67de84c359c060372e1f /usr.sbin/swapinfo
parent8d7547c27e2b8bd810354050321cd0368e320836 (diff)
downloadsrc-ceff08fff557c3381cc8017e79bf32b6c92389ab.tar.gz
src-ceff08fff557c3381cc8017e79bf32b6c92389ab.zip
Modified to use swaplist instead of swapmap.
Notes
Notes: svn path=/head/; revision=3454
Diffstat (limited to 'usr.sbin/swapinfo')
-rw-r--r--usr.sbin/swapinfo/swapinfo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/swapinfo/swapinfo.c b/usr.sbin/swapinfo/swapinfo.c
index a3e8ea42cac5..7a8d12c8a4b7 100644
--- a/usr.sbin/swapinfo/swapinfo.c
+++ b/usr.sbin/swapinfo/swapinfo.c
@@ -17,9 +17,9 @@
#include <nlist.h>
#include <kvm.h>
-struct rlist *swapmap;
+struct rlist *swaplist;
-static struct nlist nl[] = {{"_swapmap"}, /* list of free swap areas */
+static struct nlist nl[] = {{"_swaplist"}, /* list of free swap areas */
#define VM_SWAPMAP 0
{"_swdevt"}, /* list of swap devices and sizes */
#define VM_SWDEVT 1
@@ -119,9 +119,9 @@ char **argv;
exit (5);
}
- if (kvm_read(kd, nl[0].n_value, &swapmap, sizeof (struct rlist *)) !=
+ if (kvm_read(kd, nl[0].n_value, &swaplist, sizeof (struct rlist *)) !=
sizeof (struct rlist *)) {
- fprintf (stderr, "%s: didn't read all of swapmap\n",
+ fprintf (stderr, "%s: didn't read all of swaplist\n",
argv [0]);
exit (5);
}
@@ -129,10 +129,10 @@ char **argv;
/* Traverse the list of free swap space... */
total_free = 0;
- while (swapmap) {
+ while (swaplist) {
int top, bottom, next_block;
- if (kvm_read(kd, (long) swapmap, &head, sizeof (struct rlist )) !=
+ if (kvm_read(kd, (long) swaplist, &head, sizeof (struct rlist )) !=
sizeof (struct rlist )) {
fprintf (stderr, "%s: didn't read all of head\n",
argv [0]);
@@ -164,7 +164,7 @@ char **argv;
by_device [(bottom / dmmax) % nswdev] +=
top - bottom + 1;
- swapmap = head.rl_next;
+ swaplist = head.rl_next;
}
header = getbsize(&headerlen, &blocksize);