sun_add_partition() allowed the 1st sector to be 0 for the 3rd partition only if that sector was free or if other partitions covered the whole disk. Now it's always allowed for the 1st sector to be set to 0 for the 3rd partition. Signed-off-by: Mikhail Vorobyov <m.vorobyov@xxxxxxxxx> --- libfdisk/src/sun.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c index 0526227ce..c058637f5 100644 --- a/libfdisk/src/sun.c +++ b/libfdisk/src/sun.c @@ -543,6 +543,10 @@ static int sun_add_partition( fdisk_ask_number_set_low(ask, 0); /* minimal */ fdisk_ask_number_set_default(ask, 0); /* default */ fdisk_ask_number_set_high(ask, 0); /* maximal */ + } else if (n == 2) { + fdisk_ask_number_set_low(ask, 0); /* minimal */ + fdisk_ask_number_set_default(ask, fdisk_scround(cxt, start)); /* default */ + fdisk_ask_number_set_high(ask, fdisk_scround(cxt, stop)); /* maximal */ } else { fdisk_ask_number_set_low(ask, fdisk_scround(cxt, start)); /* minimal */ fdisk_ask_number_set_default(ask, fdisk_scround(cxt, start)); /* default */ -- 2.13.6 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html