Comment 3 for bug 107023

Revision history for this message
Colin Watson (cjwatson) wrote :

This is the sanity check in cfdisk that's being tripped:

    for (i = 0; i < num_parts && p_info[i].last_sector < first; i++);

    if (i < num_parts && p_info[i].id != FREE_SPACE) {
         if (last < p_info[i].first_sector)
              *errmsg = _("logical partitions not in disk order");
         else if (first + offset <= p_info[i].last_sector &&
                  p_info[i].first_sector + p_info[i].offset <= last)
              *errmsg = _("logical partitions overlap");
         else
              /* the enlarged logical partition starts at the
                 partition table sector that defines it */
              *errmsg = _("enlarged logical partitions overlap");
         return -1;
    }

I must admit that I'm finding this a bit inscrutable. It's either a bug in libparted or in cfdisk, but I have no idea which. Opening two bug tasks for that.