Documentation
¶
Index ¶
Constants ¶
View Source
const ( Signature = "EFI PART" SectorSize = 0x200 )
View Source
const ( HFSPlus = "48465300-0000-11AA-AA11-00306543ECAC" Apple_APFS = "7C3457EF-0000-11AA-AA11-00306543ECAC" Apple_UFS = "55465300-0000-11AA-AA11-00306543ECAC" ZFS = "6A898CC3-1DD2-11B2-99A6-080020736631" Apple_RAID = "52414944-0000-11AA-AA11-00306543ECAC" Apple_RAID_offline = "52414944-5F4F-11AA-AA11-00306543ECAC" Apple_Recovery_HD = "426F6F74-0000-11AA-AA11-00306543ECAC" Apple_Label = "4C616265-6C00-11AA-AA11-00306543ECAC" AppleTV_Recovery = "5265636F-7665-11AA-AA11-00306543ECAC" HFSPlus_FileVault = "53746F72-6167-11AA-AA11-00306543ECAC" None = "00000000-0000-0000-0000-000000000000" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GUIDPartitionTable ¶
GUIDPartitionTable is a GPT table object
func NewGUIDPartitionTable ¶
func NewGUIDPartitionTable(r io.Reader) (*GUIDPartitionTable, error)
NewGUIDPartitionTable reads a GPT from the given io.Reader
func (GUIDPartitionTable) CalulatePartitionsCRC ¶
func (g GUIDPartitionTable) CalulatePartitionsCRC() uint32
CalulatePartitionsCRC calculates the partition tables's CRC32 hash
type Header ¶
type Header struct {
Signature magic
Revision uint32
HeaderSize uint32
CRC32 uint32
Reserved uint32
HeaderStartLBA uint64
BackupLBA uint64
FirstUsableLBA uint64
LastUsableLBA uint64
DiskGUID guid
EntriesStart uint64
EntriesCount uint32
EntriesSize uint32
PartitionsCRC32 uint32
Padding [420]byte
}
Header is a GPT header object
func (Header) CalulateCRC ¶
CalulateCRC calculates the header's CRC32 hash
type Partition ¶
type Partition struct {
Type guid
ID guid
StartingLBA uint64
EndingLBA uint64
Attributes uint64
PartitionNameUTF16 [72]uint8
}
Partition is a GPT partition object
func (Partition) LookupType ¶
LookupType returns the string name for a given partition type if known otherwise it will return the GUID
Click to show internal directories.
Click to hide internal directories.