diff options
author | dillon <dillon@FreeBSD.org> | 1999-02-06 06:33:55 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-02-06 06:33:55 +0000 |
commit | 949435a52dd1bbc5b542aeb66d0173e233106ccf (patch) | |
tree | d0cb052645344f6e20f615fcbeeaebf93bc3ab00 /usr.bin/top/machine.c | |
parent | 4ddefa431594d651b720e31c5d78a278ece77354 (diff) | |
download | FreeBSD-src-949435a52dd1bbc5b542aeb66d0173e233106ccf.zip FreeBSD-src-949435a52dd1bbc5b542aeb66d0173e233106ccf.tar.gz |
Make 'top' handle case w/ new swapper where no swap is configured
Diffstat (limited to 'usr.bin/top/machine.c')
-rw-r--r-- | usr.bin/top/machine.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index a7d96a9..c39d547 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -19,7 +19,7 @@ * Steven Wallace <swallace@freebsd.org> * Wolfram Schneider <wosch@FreeBSD.org> * - * $Id: machine.c,v 1.18 1999/01/09 20:25:02 obrien Exp $ + * $Id: machine.c,v 1.19 1999/01/22 11:09:41 dillon Exp $ */ @@ -980,7 +980,7 @@ swapmode(retavail, retfree) #define CONVERT(v) ((quad_t)(v) * pagesize / 1024) n = kvm_getswapinfo(kd, swapary, 1, 0); - if (n < 0) + if (n < 0 || swapary[0].ksw_total == 0) return(0); *retavail = CONVERT(swapary[0].ksw_total); |