Be nice when no swap is configured in system
This commit is contained in:
parent
47b370f5c6
commit
300c6da23d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=43698
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user