From ceff08fff557c3381cc8017e79bf32b6c92389ab Mon Sep 17 00:00:00 2001 From: David Greenman Date: Sun, 9 Oct 1994 07:45:58 +0000 Subject: Modified to use swaplist instead of swapmap. --- usr.sbin/swapinfo/swapinfo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'usr.sbin/swapinfo') 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 #include -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); -- cgit v1.2.3