1 if all extended partitions are used up adding a new partition will also ask if
2 you want to add a logical partition. Choosing this option makes fdisk segfault
4 *** util-linux-2.11y/fdisk/fdisk.c.000 2003-09-08 14:47:41.000000000 +0200
5 --- util-linux-2.11y/fdisk/fdisk.c 2003-09-08 15:01:42.000000000 +0200
8 for (i = 0; i < 4; i++)
9 free_primary += !ptes[i].part_table->sys_ind;
11 ! if (!free_primary && partitions >= MAXIMUM_PARTS) {
12 ! printf(_("The maximum number of partitions has been created\n"));
18 for (i = 0; i < 4; i++)
19 free_primary += !ptes[i].part_table->sys_ind;
21 ! // Fix to only add primary partition if all logical partions are used <leonardjo@hetnet.nl>
22 ! if (partitions >= MAXIMUM_PARTS) {
23 ! if (!free_primary) {
24 ! printf(_("The maximum number of partitions has been created\n"));
28 ! add_partition(get_partition(0, 4),