diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1998-11-28 02:37:36 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1998-11-28 02:37:36 +0000 |
commit | eecdb9deb4317c0e37ed8d58ba92503563912fed (patch) | |
tree | c12b62c16de54ffdca14b5ed629d3fc6bbb36df4 /usr.bin | |
parent | 38e8ab0646eef15082299d89c8d38d6a7fd01f0f (diff) |
do not count swap spaces that were not swapon(2)ed
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/top/machine.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index a4279b29b6d..be632694ca4 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machine.c,v 1.13 1998/09/20 06:19:14 niklas Exp $ */ +/* $OpenBSD: machine.c,v 1.14 1998/11/28 02:37:35 kstailey Exp $ */ /* * top - a top users display for Unix @@ -983,9 +983,11 @@ int *total; for (i = 0; i < nswdev; i++) { int xsize, xfree; - xsize = sw[i].sw_nblks; - xfree = perdev[i]; - *total += xsize; + if (sw[i].sw_flags & SW_FREED) { + xsize = sw[i].sw_nblks; + xfree = perdev[i]; + *total += xsize; + } } /* |