mbr

package
v1.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2021 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MBRSignature = uint16(0xaa55)

Functions

This section is empty.

Types

type AAPMBRHeader

type AAPMBRHeader struct {
	BootStrapCode    [428]byte       `json:"bootstrapCode,omitempty"`
	AAPSignature     uint16          `json:"msdosSignature,omitempty"`
	AAPRecord        AAPRecord       `json:"aapRecord,omitempty"`
	PartitionEntries [4]MBRPartition `json:"partitionEntries,omitempty"`
	BootSignature    uint16          `json:"signature,omitempty"`
}

func (AAPMBRHeader) Is

func (a AAPMBRHeader) Is() bool

type AAPRecord

type AAPRecord struct {
	AAPPhysicalDrive uint8  `json:"aapPhysicalDrive,omitempty"`
	FirstCHS         CHS    `json:"firstCHS"`
	AAPPartitionType uint8  `json:"aapPartitionType"`
	LastCHS          CHS    `json:"lastCHS"`
	FirstLBA         uint32 `json:"firstLBA"`
	NumSectos        uint32 `json:"numSectors"`
}

type CHS

type CHS struct {
	Cylinder uint8 `json:"cylinder"`
	Head     uint8 `json:"head"`
	Sector   uint8 `json:"sector"`
}

type ClassicMBRHeader

type ClassicMBRHeader struct {
	BootstrapCode    [446]byte       `json:"bootstrapCode,omitempty"`
	PartitionEntries [4]MBRPartition `json:"partitionEntries,omitempty"`
	BootSignature    uint16          `json:"signature,omitempty"`
}

func (ClassicMBRHeader) Is

func (c ClassicMBRHeader) Is() bool

type DiskTimestamp

type DiskTimestamp struct {
	OriginalPhysicalDrive uint8 `json:"originalPhysicalDrive"`
	Seconds               uint8 `json:"seconds"`
	Minutes               uint8 `json:"minutes"`
	Hours                 uint8 `json:"hours"`
}

type MBRPartition

type MBRPartition struct {
	Status        uint8  `json:"status"`
	FirstCHS      CHS    `json:"firstCHS"`
	PartitionType uint8  `json:"partitionType"`
	LastCHS       CHS    `json:"lastCHS"`
	FirstLBA      uint32 `json:"firstLBA"`
	NumSectors    uint32 `json:"numSectors"`
}

func (MBRPartition) Is

func (p MBRPartition) Is() bool

type MSDOSMBRHeader

type MSDOSMBRHeader struct {
	BootStrapCode    [380]byte       `json:"bootstrapCode,omitempty"`
	MSDOSSignature   uint16          `json:"msdosSignature,omitempty"`
	PartitionEntries [8]MBRPartition `json:"partitionEntries,omitempty"`
	BootSignature    uint16          `json:"signature,omitempty"`
}

func (MSDOSMBRHeader) Is

func (m MSDOSMBRHeader) Is() bool

type ModernStandardMBRHeader

type ModernStandardMBRHeader struct {
	BootStrapCode       [218]byte       `json:"bootstrapCode,omitempty"`
	Empty               uint16          `json:"-"`
	DiskTimestamp       DiskTimestamp   `json:"diskTimestamp,omitempty"`
	SecondBootStrapCode [216]byte       `json:"secondBootstrapCode,omitempty"`
	DiskSignature       uint32          `json:"signature"`
	CopyProtectedStatus uint16          `json:"copyProtectedStatus"`
	PartitionEntries    [4]MBRPartition `json:"partitionEntries,omitempty"`
	BootSignature       uint16          `json:"signature,omitempty"`
}

func (ModernStandardMBRHeader) Is

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL