Author: nwhitehorn
Date: Fri May 18 17:43:15 2018
New Revision: 333803
URL: https://svnweb.freebsd.org/changeset/base/333803

Log:
  Fix math error in the computation of the free space after the last partition
  on a disk. This resulted in one sector always remaining free at the end.
  
  PR:           bin/228322
  Submitted by: Rikiya Yonemoto
  MFC after:    2 weeks

Modified:
  head/usr.sbin/bsdinstall/partedit/gpart_ops.c

Modified: head/usr.sbin/bsdinstall/partedit/gpart_ops.c
==============================================================================
--- head/usr.sbin/bsdinstall/partedit/gpart_ops.c       Fri May 18 17:29:43 
2018        (r333802)
+++ head/usr.sbin/bsdinstall/partedit/gpart_ops.c       Fri May 18 17:43:15 
2018        (r333803)
@@ -856,7 +856,7 @@ gpart_max_free(struct ggeom *geom, intmax_t *npartstar
        }
 
        if (end - lastend > maxsize) {
-               maxsize = end - lastend - 1;
+               maxsize = end - lastend;
                maxstart = lastend + 1;
        }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to