Documentation ¶
Index ¶
- Constants
- Variables
- type CHS
- type MasterBootRecord
- type Partition
- func (p Partition) Bootable() bool
- func (p Partition) GetSectionReader() io.SectionReader
- func (p Partition) GetSize() uint64
- func (p Partition) GetStartSector() uint64
- func (p Partition) GetType() []byte
- func (p Partition) Index() int
- func (p Partition) IsSupported() bool
- func (p Partition) Name() string
Constants ¶
View Source
const ( SIGNATURE = 0xAA55 Sector = 512 )
Variables ¶
View Source
var InvalidSignature = xerrors.New("Invalid master boot record signature")
Functions ¶
This section is empty.
Types ¶
type MasterBootRecord ¶
type MasterBootRecord struct { BootCodeArea [440]byte UniqueMBRDiskSignature [4]byte Unknown [2]byte Partitions [4]Partition Signature uint16 // contains filtered or unexported fields }
func NewMasterBootRecord ¶
func NewMasterBootRecord(sr *io.SectionReader) (*MasterBootRecord, error)
type Partition ¶
type Partition struct { Boot bool StartCHS CHS Type byte EndCHS CHS StartSector uint32 Size uint32 // contains filtered or unexported fields }
func (Partition) GetSectionReader ¶
func (p Partition) GetSectionReader() io.SectionReader
func (Partition) GetStartSector ¶
func (Partition) IsSupported ¶
Click to show internal directories.
Click to hide internal directories.