Author: marcel
Date: Sat Dec  2 18:41:01 2017
New Revision: 326477
URL: https://svnweb.freebsd.org/changeset/base/326477

Log:
  MFC r324369
  Fix alignment of 'last' in autofill.

Modified:
  stable/11/sbin/geom/class/part/geom_part.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/geom/class/part/geom_part.c
==============================================================================
--- stable/11/sbin/geom/class/part/geom_part.c  Sat Dec  2 18:00:01 2017        
(r326476)
+++ stable/11/sbin/geom/class/part/geom_part.c  Sat Dec  2 18:41:01 2017        
(r326477)
@@ -534,7 +534,7 @@ gpart_autofill(struct gctl_req *req)
        last = (off_t)strtoimax(s, NULL, 0);
        grade = ~0ULL;
        a_first = ALIGNUP(first + offset, alignment);
-       last = ALIGNDOWN(last + offset, alignment);
+       last = ALIGNDOWN(last + offset + 1, alignment) - 1;
        if (a_first < start)
                a_first = start;
        while ((pp = find_provider(gp, first)) != NULL) {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to