]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: (dos) follow explicit sizes
authorKarel Zak <kzak@redhat.com>
Thu, 9 Oct 2014 10:10:36 +0000 (12:10 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 9 Oct 2014 10:10:36 +0000 (12:10 +0200)
commitbcdeacd7962a84f59aa805bd2b4ea3a213ff86d4
treee456cb78e451f4d1469c71a9e40730216f1e3411
parent18b266cea329b803a58af50254769f3de4eab9d9
libfdisk: (dos) follow explicit sizes

* this patch add to dos driver support for fdisk_partition->size_explicit
  to avoid unexpected last sector alignment for sizes explicitly specified
  in sectors

* add support for small "first LBA", the current default is to use
  1MiB offset for the first partition and for each EBR. This is not
  backwardly compatible and it makes impossible to apply sfdisk
  scripts/dumps from old systems, because original offset can be
  smaller than 2048 sectors (old sfdisk default is 1 sector).

  The solution is on the fly to detect this situation and change
  fdisk_context->first_lba to 1 sector. Nasty.

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c