Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SchemaMBR identifies a Master Boot Record partitioning schema, or an // MBR like role SchemaMBR = "mbr" // SchemaGPT identifies a GUID Partition Table partitioning schema SchemaGPT = "gpt" )
Variables ¶
This section is empty.
Functions ¶
func GeneratePartitionTable ¶
func GeneratePartitionTable(volume *gadget.Volume, sectorSize uint64, imgSize uint64, isSeeded bool) (partition.Table, int, error)
GeneratePartitionTable prepares the partition table for structures in a volume and returns it with the partition number of the root partition.
Types ¶
type GPTTable ¶
type GPTTable struct {
// contains filtered or unexported fields
}
func (*GPTTable) AddPartition ¶
func (t *GPTTable) AddPartition(structurePair *gadget.OnDiskAndGadgetStructurePair, structureType string) error
func (*GPTTable) GetConcreteTable ¶
func (*GPTTable) PartitionTableSize ¶
PartitionTableSize returns the total size in bytes of the partition table
type MBRTable ¶
type MBRTable struct {
// contains filtered or unexported fields
}
func (*MBRTable) AddPartition ¶
func (t *MBRTable) AddPartition(structurePair *gadget.OnDiskAndGadgetStructurePair, structureType string) error
func (*MBRTable) GetConcreteTable ¶
func (*MBRTable) PartitionTableSize ¶
PartitionTableSize returns the total size in bytes of the partition table
type Table ¶
type Table interface { AddPartition(structurePair *gadget.OnDiskAndGadgetStructurePair, structureType string) error GetConcreteTable() partition.Table PartitionTableSize() uint64 }
Table is a light wrapper around partition.Table to properly add partitions Some work is sadly duplicated because the go-diskfs lib does not expose the needed data (first/last LBA)
Click to show internal directories.
Click to hide internal directories.