util-linux/libfdisk/docs
Karel Zak 387ac2771f libfdisk: (gpt) add functionality to move backup header
- add fdisk_gpt_disable_relocation() to disable move backup header to standard location

- add fdisk_gpt_enable_minimize() to move backup header behind last partition

Note that fdisk_gpt_disable_relocation() has to be used before fdisk_assign_device(),
because automatic relocation is done when libfdisk reads the header from the device.

For example:
	lb = fdisk_get_label(cxt, "gpt");

	fdisk_gpt_disable_relocation(lb, 1);
	fdisk_assign_device(cxt, devname, 0);

For fdisk_gpt_enable_minimize() it's not important as recalculation is
done before write, for example:

	fdisk_assign_device(cxt, devname, 0);
	fdisk_gpt_enable_minimize(fdisk_get_label(cxt, NULL), 1);

	... add partition, etc ...

	fdisk_write_disklabel(cxt);

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-02-05 14:37:41 +01:00
..
.gitignore libfdisk: add API docs 2014-11-26 19:13:57 +01:00
Makefile.am misc: fix typos using codespell 2018-02-16 11:12:52 +01:00
libfdisk-docs.xml docs: update year in libs docs 2020-01-06 12:59:45 +01:00
libfdisk-sections.txt libfdisk: (gpt) add functionality to move backup header 2020-02-05 14:37:41 +01:00
version.xml.in libfdisk: add API docs 2014-11-26 19:13:57 +01:00