Date: Sun, 9 Jan 2011 21:02:12 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r217205 - user/nwhitehorn/bsdinstall/partedit Message-ID: <201101092102.p09L2CGY056454@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Sun Jan 9 21:02:11 2011 New Revision: 217205 URL: http://svn.freebsd.org/changeset/base/217205 Log: Made the adjustment to maxsize in the wrong place, which could fail for partition schemes with boot partitions like GPT. Modified: user/nwhitehorn/bsdinstall/partedit/gpart_ops.c Modified: user/nwhitehorn/bsdinstall/partedit/gpart_ops.c ============================================================================== --- user/nwhitehorn/bsdinstall/partedit/gpart_ops.c Sun Jan 9 20:53:13 2011 (r217204) +++ user/nwhitehorn/bsdinstall/partedit/gpart_ops.c Sun Jan 9 21:02:11 2011 (r217205) @@ -604,7 +604,7 @@ gpart_create(struct gprovider *pp) if (stripe > 0 && (firstfree*sector % stripe) != 0) firstfree += (stripe - ((firstfree*sector) % stripe)) / sector; - size = maxsize = end - firstfree; + size = end - firstfree; if (size <= 0) { dialog_msgbox("Error", "No free space left on device.", 0, 0, TRUE); @@ -614,6 +614,7 @@ gpart_create(struct gprovider *pp) /* Leave a free megabyte in case we need to write a boot partition */ if (size*sector >= 1024*1024) size -= 1024*1024/sector; + maxsize = size; humanize_number(sizestr, 7, size*sector, "B", HN_AUTOSCALE, HN_NOSPACE | HN_DECIMAL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101092102.p09L2CGY056454>