]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Merge branch 'chs' of https://github.com/pali/util-linux
authorKarel Zak <kzak@redhat.com>
Mon, 2 Aug 2021 08:40:10 +0000 (10:40 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 2 Aug 2021 08:40:10 +0000 (10:40 +0200)
* 'chs' of https://github.com/pali/util-linux:
  fdisk: Add support for fixing MBR partitions CHS values
  libfdisk: (dos) Add function fdisk_dos_fix_chs() for fixing CHS values for all partitions
  libfdisk: (dos) Add function dos_partition_sync_chs() for updating CHS values

1  2 
libfdisk/src/dos.c

index 2e89c01c73953c099da48d3424564577422783fc,e72b644f2e03c333efa461a45e6f8601cf28ce7e..1eb3ec53bc77848e7deab4036048ec4091745fb3
@@@ -2657,13 -2732,9 +2727,14 @@@ int fdisk_dos_move_begin(struct fdisk_c
  
                dos_partition_set_size(p, sects);
                dos_partition_set_start(p, new);
+               dos_partition_sync_chs(p, pe->offset, cxt->geom.sectors, cxt->geom.heads);
  
                partition_set_changed(cxt, i, 1);
 +
 +              if (new == 0)
 +                      fdisk_info(cxt, _("The new beginning of the partition overlaps the disk "
 +                                        "label area. Be very careful when using the partition. "
 +                                        "You can lose all your partitions on the disk."));
        }
  
        return rc;