From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 Description of problem: # parted /dev/hdd mkpart l 10904 14905 Warning: You requested to create a partition at 10904.000-14905.000Mb. The closest Parted can manage is 14904.083-14911.896Mb. OK/Cancel? C Actual results: Segmentation fault (same in user interface mode) Expected results: Information: Don't forget to update /etc/fstab, if necessary. Version-Release number of selected component (if applicable): parted-1.6.3-30 How reproducible: Always
Created attachment 95151 [details] Proposed fix.
Comment on attachment 95151 [details] Proposed fix. Patch looks trivial, but causes mkpart to lock up.
Created attachment 95180 [details] Tested different fix # parted /dev/hdd mkpart l 10904 14905 Warning: You requested to create a partition at 10904.000-14905.000Mb. The closest Parted can manage is 14904.083-14911.896Mb. OK/Cancel? C Information: Don't forget to update /etc/fstab, if necessary. # parted /dev/hdd mkpart l 10904 14905 Warning: You requested to create a partition at 10904.000-14905.000Mb. The closest Parted can manage is 14904.083-14911.896Mb. OK/Cancel? OK Information: Don't forget to update /etc/fstab, if necessary.
Just had the idea to get a newer parted tarball from rpmseek.com (since there's none in the parted download area), and parted 1.6.6 contains a fix for this, albeit they've moved the code-line down a few more lines.
Compared with the do_mkpartfs() function below, I've moved the code-line in do_mkpart() to the same place. That looks right. The "fix" in upstream parted 1.6.6 puts the line in a different place, which contradicts with how they do it in the do_mkpartfs() function below. I doubt there is a reason for that inconsistency.
After upstream mailing-list discussion, I stick to my patch from comment #3.
Added for -31
Thanks!