Documentation
¶
Overview ¶
Package dvh reads the SGI disk volume header ("dvh"): the 512-byte label at block 0 of SGI disks and CD images, holding a directory of raw boot files (sash, fx, ide) and the partition table.
Index ¶
Constants ¶
const Magic = 0x0be5a941
Magic is the big-endian value at byte 0 of a volume header.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootFile ¶
BootFile is a volume-directory entry: a raw file (sash, fx, ide) stored outside any filesystem, addressed by logical block number.
type Header ¶
type Header struct {
BootFiles []BootFile
Partitions [16]Partition
// contains filtered or unexported fields
}
Header is a parsed volume header.
func Parse ¶
Parse reads a volume header from b, which must hold at least 512 bytes. A checksum mismatch does not fail the parse — real images are served on magic and bounds, and ChecksumOK lets the caller warn.
func (*Header) ChecksumOK ¶
ChecksumOK reports whether the header's int32-word sum is zero, the dvh checksum rule.
type Partition ¶
type Partition struct {
Blocks int32
First int32
Type PartitionType
}
Partition is one slot of the 16-entry partition table. Sizes and offsets are in 512-byte blocks.
type PartitionType ¶
type PartitionType int32
PartitionType identifies what a partition holds.
const ( TypeVolHdr PartitionType = 0 TypeRaw PartitionType = 3 TypeVolume PartitionType = 6 TypeEFS PartitionType = 7 TypeXFS PartitionType = 10 )
Partition types from the SGI partition table.