Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGPTProtectiveMBR = errors.New("GPT protective MBR found")
ErrGPTProtectiveMBR denotes GPT protected MBR found error.
Functions ¶
This section is empty.
Types ¶
type AAPHeader ¶
type AAPHeader struct {
BootstrapCode [428]byte
AAPSignature uint16 // 2 bytes.
AAPPhysicalDrive uint8 // 1 byte.
FirstCHS CHS // 3 bytes.
AAPPartitionType uint8 // 1 byte.
LastCHS CHS // 3 bytes.
FirstLBA uint32 // 4 bytes.
NumSectors uint32 // 4 bytes.
PartitionEntries [4]PartEntry // 4 x 16 bytes.
BootSignature uint16 // 2 bytes.
}
AAPHeader denotes Advanced Active Partitions MBR header.
type ClassicHeader ¶
type ClassicHeader struct {
BootstrapCode [446]byte
PartitionEntries [4]PartEntry // 4 x 16 bytes.
BootSignature uint16 // 2 bytes.
}
ClassicHeader denotes classical generic MBR header.
type MBR ¶
type MBR struct {
// contains filtered or unexported fields
}
MBR is interface compatible partition table information.
func Probe ¶
func Probe(readSeeker io.ReadSeeker) (mbr *MBR, err error)
Probe reads and returns MBR style partition table.
func (*MBR) Partitions ¶
Partitions returns list of partitions.
type MSDOSHeader ¶
type MSDOSHeader struct {
BootstrapCode [380]byte
MSDOSSignature uint16 // 2 bytes.
PartitionEntries [8]PartEntry // 8 x 16 bytes.
BootSignature uint16 // 2 bytes.
}
MSDOSHeader denotes MSDOS MBR header.
type ModernStandardHeader ¶
type ModernStandardHeader struct {
BootstrapCode [218]byte
Empty uint16 // 2 bytes.
OriginalPhysicalDrive uint8 // 1 byte.
Seconds uint8 // 1 byte.
Minutes uint8 // 1 byte.
Hours uint8 // 1 byte.
SecondBootstrapCode [216]byte
DiskSignature uint32 // 4 bytes.
CopyProtectedStatus uint16 // 2 bytes.
PartitionEntries [4]PartEntry // 4 x 16 bytes.
BootSignature uint16 // 2 bytes.
}
ModernStandardHeader denotes modern standard MBR header.
Click to show internal directories.
Click to hide internal directories.