]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: add {first,last}-lba header to sfdisk scritps
authorKarel Zak <kzak@redhat.com>
Mon, 2 Mar 2015 12:58:23 +0000 (13:58 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 12 Mar 2015 09:14:35 +0000 (10:14 +0100)
commitef70ccd914c51babf61685d0ea17d0cb7ce58c1c
treec39f63110f253ca913fc1f1348b48fb406d24288
parentbf2a40ba26aa65df0873ce1d259e87927d1ff6e9
libfdisk: add {first,last}-lba header to sfdisk scritps

The current sfdisk does not allow to create partition that
starts before the default libfdisk First LBA (~1MiB). It
means that

 # sfdisk --dump /dev/sda > foo
 # sfdisk /dev/sdb < foo

does not work on systems where 1st partition does not start at offset
2048.

This patch add new headers to scripts to inform libfdisk about different
First/Last LBA ranges. For example:

 label: gpt
 first-lba: 34

allows to override the library default.

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