summaryrefslogtreecommitdiff
path: root/sbin/geom/class
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2017-10-06 16:38:00 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2017-10-06 16:38:00 +0000
commitb5dc98c0497f5ae5ee29ccb45383f4c202df8885 (patch)
treec2b2c3fae2baf935ee249cfc91c5c86069914df9 /sbin/geom/class
parent845ed71645fcabae1e0b7aee43ac51a80e0d8787 (diff)
Notes
Diffstat (limited to 'sbin/geom/class')
-rw-r--r--sbin/geom/class/part/geom_part.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/geom/class/part/geom_part.c b/sbin/geom/class/part/geom_part.c
index d21e5eb6b6577..7f668d32e9a64 100644
--- a/sbin/geom/class/part/geom_part.c
+++ b/sbin/geom/class/part/geom_part.c
@@ -547,7 +547,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) {