summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pstat/pstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pstat/pstat.c')
-rw-r--r--usr.sbin/pstat/pstat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/pstat/pstat.c b/usr.sbin/pstat/pstat.c
index 0b67c38..af0b4b3 100644
--- a/usr.sbin/pstat/pstat.c
+++ b/usr.sbin/pstat/pstat.c
@@ -1084,7 +1084,10 @@ swapmode()
devname(sw[i].sw_dev, S_IFBLK),
hlen, sw[i].sw_nblks / div);
- xsize = sw[i].sw_nblks;
+ /* The first dmmax is never allocated to avoid trashing of
+ * disklabels
+ */
+ xsize = sw[i].sw_nblks - dmmax;
xfree = perdev[i];
used = xsize - xfree;
npfree++;
OpenPOWER on IntegriCloud