apm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Signature          uint16
	MapEntries         uint32
	PhysicalBlockStart uint32
	PhysicalBlocks     uint32
	Name               string
	Type               string
	LogicalBlockStart  uint32
	LogicalBlocks      uint32
	Flags              uint32
	BootBlock          uint32
	BootBytes          uint32
}

Entry is one Apple Partition Map slot.

type Options

type Options struct {
	// HFSSize is the HFS/HFS+ partition size in bytes. If 0, the remainder of the disk is used.
	HFSSize int64
	Name    string
	HFSX    bool
}

Options for Initialize.

type Table

type Table struct {
	Entries []Entry
	// contains filtered or unexported fields
}

Table is an Apple Partition Map.

func Initialize

func Initialize(d disk.Disk, opt Options) (*Table, error)

Initialize writes a Driver Descriptor Map and a 3-entry APM (Apple_partition_map, Apple_HFS/HFSX, Apple_Free leftover).

func Parse

func Parse(d disk.Disk) (*Table, error)

func (*Table) Kind

func (t *Table) Kind() part.Kind

func (*Table) Partitions

func (t *Table) Partitions() []part.Info

Jump to

Keyboard shortcuts

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