diff options
author | dillon <dillon@FreeBSD.org> | 1999-02-06 06:43:56 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-02-06 06:43:56 +0000 |
commit | 83476feadee21ce1fc425697c109dcabcd83847c (patch) | |
tree | 3574530b802aa2dfac58bc4e0b2f519cfbd92735 /usr.bin/systat | |
parent | 949435a52dd1bbc5b542aeb66d0173e233106ccf (diff) | |
download | FreeBSD-src-83476feadee21ce1fc425697c109dcabcd83847c.zip FreeBSD-src-83476feadee21ce1fc425697c109dcabcd83847c.tar.gz |
Be nice when no swap is configured in system
Diffstat (limited to 'usr.bin/systat')
-rw-r--r-- | usr.bin/systat/swap.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.bin/systat/swap.c b/usr.bin/systat/swap.c index c130028..906d7b9 100644 --- a/usr.bin/systat/swap.c +++ b/usr.bin/systat/swap.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)swap.c 8.3 (Berkeley) 4/29/95"; #endif static const char rcsid[] = - "$Id: swap.c,v 1.8 1999/01/22 10:53:13 dillon Exp $"; + "$Id: swap.c,v 1.9 1999/01/22 10:57:50 dillon Exp $"; #endif /* not lint */ /* @@ -110,6 +110,7 @@ initswap() error(msgbuf); return (0); } + once = 1; return (1); } @@ -167,6 +168,15 @@ showswap() ); col += 5; } + if (kvmsw[i].ksw_total == 0) { + mvwprintw( + wnd, + i + 1, + col + 5, + "(swap not configured)" + ); + continue; + } mvwprintw( wnd, |