On 11/11/11 19:21, Kenneth R Westerback wrote: > CVSROOT: /cvs > Module name: src > Changes by: k...@cvs.openbsd.org 2011/11/11 11:21:06 > > Modified files: > sbin/fdisk : cmd.c > > Log message: > A zero-length partition is a non-partition, so reject a partition > length of 0. And anyway PRT_fix_CHS() writes garbage when length > is zero. > > Refresh the in-memory copy to reflect any data that was written > out, so you can see that your changes have taken effect. > > Surprise behaviours noted by matthew@ at c2k11.
If it hasn't been changed lately, disklabel can use the same kind of love, for the cases where it rounds the size down to zero by itself. It's been on my todo for some time. Be warned; disklabel has special needs, so it may or may not be trivial to cook a nice diff for it. e.g. # disklabel sd0 Label editor (enter '?' for help at any prompt) > a partition: [j] offset: [73256400] size: [16] FS type: [4.2BSD] > w > q No label changes. # disklabel sd0 /.../ disklabel: warning, partition j: size 0, but offset 73256416 /Alexander