syslinux

package
v1.2.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package syslinux provides syslinux-compatible ADV data.

Index

Constants

View Source
const (
	// AdvSize is the total size.
	AdvSize = 512
	// AdvLen is the usable data size.
	AdvLen = AdvSize - 3*4
	// AdvMagic1 is the head signature.
	AdvMagic1 = uint32(0x5a2d2fa5)
	// AdvMagic2 is the total checksum.
	AdvMagic2 = uint32(0xa3041767)
	// AdvMagic3 is the tail signature.
	AdvMagic3 = uint32(0xdd28bf64)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ADV

type ADV []byte

ADV represents the Syslinux Auxiliary Data Vector.

func NewADV

func NewADV(r io.ReadSeeker) (adv ADV, err error)

NewADV returns the Auxiliary Data Vector.

func (ADV) Bytes

func (a ADV) Bytes() ([]byte, error)

Bytes returns serialized contents of ADV.

func (ADV) DeleteTag

func (a ADV) DeleteTag(t uint8) (ok bool)

DeleteTag deletes a tag in the ADV.

func (ADV) ReadTag

func (a ADV) ReadTag(t uint8) (val string, ok bool)

ReadTag reads a tag in the ADV.

func (ADV) ReadTagBytes added in v0.9.0

func (a ADV) ReadTagBytes(t uint8) (val []byte, ok bool)

ReadTagBytes reads a tag in the ADV.

func (ADV) SetTag

func (a ADV) SetTag(t uint8, val string) bool

SetTag sets a tag in the ADV.

func (ADV) SetTagBytes added in v0.9.0

func (a ADV) SetTagBytes(t uint8, val []byte) (ok bool)

SetTagBytes sets a tag in the ADV.

Jump to

Keyboard shortcuts

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