]> 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>
Mon, 2 Mar 2015 12:58:23 +0000 (13:58 +0100)
commitb7c67e6414a68caaef133e978b3110d599f3d147
treeceaafb05e947de09c4a7e38457e9f002d1ff6c5d
parent14160b7bd08f54f977993cae4c4ed2cbfcb9d1ae
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