Structsยง
- Async
Component ๐Disk Part - Async
Composite Disk File - Component
Disk ๐Part - Composite
Disk File - Represents a composite virtual disk made out of multiple component files. This is described on disk by a protocol buffer file that lists out the component file locations and their offsets and lengths on the virtual disk. The spaces covered by the component disks must be contiguous and not overlapping.
- Partition
Info - Information about a partition to create.
Enumsยง
- Error
- Image
Partition Type - The type of partition.
Constantsยง
- CDISK_
MAGIC - A magic string placed at the beginning of a composite disk file to identify it.
- COMPOSITE_
DISK_ ๐VERSION - The version of the composite disk format supported by this implementation.
- EFI_
SYSTEM_ ๐PARTITION_ GUID - HEADER_
PADDING_ ๐LENGTH - LINUX_
FILESYSTEM_ ๐GUID - PARTITION_
ALIGNMENT_ ๐SIZE - The amount of padding needed between the last partition entry and the first partition, to align the partition appropriately. The two sectors are for the MBR and the GPT header.
- PARTITION_
SIZE_ ๐SHIFT
Functionsยง
- create_
component_ ๐disks - Create one or more
ComponentDiskproto messages for the given partition. - create_
composite_ disk - Create a new composite disk image containing the given partitions, and write it out to the given files.
- create_
gpt_ ๐entry - Create the
GptPartitionEntryfor the given partition. - create_
zero_ filler - Create a zero filler file which can be used to fill the gaps between partition files. The filler is sized to be big enough to fill the gaps. (1 << PARTITION_SIZE_SHIFT)
- range_
intersection ๐ - ranges_
overlap ๐ - write_
beginning ๐ - Write protective MBR and primary GPT table.
- write_
end ๐ - Write secondary GPT table.