aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrij Tejblum <dt@FreeBSD.org>1999-02-14 21:42:05 +0000
committerDmitrij Tejblum <dt@FreeBSD.org>1999-02-14 21:42:05 +0000
commitbd54ec1edf18767c54119456d38bd5e17a9aec38 (patch)
tree2c895f0604487be2eea9ee22af3d481a5d7f186a
parent21300d38a65980a9f38f0490b9c31123d28f350b (diff)
Notes
-rw-r--r--lib/libkvm/kvm_getswapinfo.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libkvm/kvm_getswapinfo.c b/lib/libkvm/kvm_getswapinfo.c
index 596e6bc7aec5..f0f1967c16ef 100644
--- a/lib/libkvm/kvm_getswapinfo.c
+++ b/lib/libkvm/kvm_getswapinfo.c
@@ -14,7 +14,7 @@ static const char copyright[] =
#ifndef lint
static const char rcsid[] =
- "$Id: kvm_getswapinfo.c,v 1.4 1999/01/27 11:29:15 bde Exp $";
+ "$Id: kvm_getswapinfo.c,v 1.5 1999/02/06 06:31:57 dillon Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -175,12 +175,15 @@ kvm_getswapinfo(
*
* new style: swinfo in DEV_BSIZE'd chunks but dmmax
* in pages.
+ *
+ * The first dmmax is never allocating to avoid
+ * trashing the disklabels
*/
if (type == 1)
- ttl = dbtoc(swinfo.sw_nblks);
+ ttl = dbtoc(swinfo.sw_nblks - dmmax);
else
- ttl = swinfo.sw_nblks;
+ ttl = swinfo.sw_nblks - dmmax;
if (ttl == 0)
continue;