kpmcore/src/backend
Gaël PORTAY 0ffec31e2b Add new job to set the GPT partition attributes
The GPT partition layout supports partition attributes.

The CLI sfdisk sets the partition attributes using the option
--part-attrs. See the examples below:

	$ cat <<EOF | sfdisk disk.img
	label: gpt
	type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, size=64M
	type=0FC63DAF-8483-4772-8E79-3D69D8477DE4
	EOF
	(...)

	$ sfdisk --part-attrs disk.img 1 RequiredPartition,NoBlockIOProtocol,LegacyBIOSBootable,48
	(...)

	$ sfdisk --part-attrs disk.img 2 60,61,62,63
	(...)

	$ sfdisk --dump disk.img
	(...)
	disk.img1 : start=        2048, size=      131072, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=BBE806BB-8567-A843-9FF5-9B6B35D2908E, attrs="RequiredPartition NoBlockIOProtocol LegacyBIOSBootable GUID:48"
	disk.img2 : start=      133120, size=     1963999, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=7DB39F08-C138-664B-B38E-ED2DEB549AA6, attrs="GUID:60,61,62,63"

This commit introduces the new job set-partition-attributes that is used
in the new-operation to set the attributes of the partition. The job
uses the newly introduced method setPartitionAttributes that is
implemented by the sfdisk and dummy backends.

Note: This is a copypaste of what was done for GPT partition label in
commit f585f6c (Add new job to set the GPT partition label) and GPT
partition UUID in commit 1dde035 (Add new job to set the GPT partition
UUID).

Note: RequiredPartition, NoBlockIOProtocol, LegacyBIOSBootable are
key words for 0, 1 and 2.
2020-06-15 17:51:42 -04:00
..
CMakeLists.txt Do not install internal backend headers. 2017-12-27 16:16:11 +00:00
corebackend.cpp d-pointerize FstabEntry class 2018-04-01 18:46:26 +01:00
corebackend.h Add scanDevices function that uses flags instead of bools. 2019-02-09 15:40:06 +00:00
corebackenddevice.cpp sfdisk: store a pointer to the device in SfdiskPartitionTable class. 2017-12-07 20:50:54 +00:00
corebackenddevice.h Fix minor EBN issues 2020-03-21 11:22:15 +00:00
corebackendmanager.cpp Move KAuth helper setup code to ExternalCommand class. 2018-04-14 23:55:05 +03:00
corebackendmanager.h Move KAuth helper setup code to ExternalCommand class. 2018-04-14 23:55:05 +03:00
corebackendpartitiontable.cpp Move kpmcore library into its own repository. 2015-06-04 01:29:22 +01:00
corebackendpartitiontable.h Add new job to set the GPT partition attributes 2020-06-15 17:51:42 -04:00