bootloader

package
v0.7.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

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)
)
View Source
const (
	// AdvEnd is the noop tag.
	AdvEnd = iota
	// AdvBootonce is the bootonce tag.
	AdvBootonce
	// AdvMenusave is the menusave tag.
	AdvMenusave
	// AdvReserved1 is a reserved tag.
	AdvReserved1
	// AdvReserved2 is a reserved tag.
	AdvReserved2
	// AdvReserved3 is a reserved tag.
	AdvReserved3
	// AdvUpgrade is the upgrade tag.
	AdvUpgrade
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ADV added in v0.7.0

type ADV []byte

ADV represents the Syslinux Auxiliary Data Vector.

func NewADV added in v0.7.0

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

NewADV returns the Auxiliary Data Vector.

func (ADV) DeleteTag added in v0.7.0

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

DeleteTag deletes a tag in the ADV.

func (ADV) ReadTag added in v0.7.0

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

ReadTag reads a tag in the ADV.

func (ADV) SetTag added in v0.7.0

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

SetTag sets a tag in the ADV.

type Bootloader

type Bootloader interface {
	Labels() (string, string, error)
	Install(string, interface{}, runtime.Sequence) error
	Default(string) error
}

Bootloader describes a bootloader.

type Meta added in v0.7.0

type Meta struct {
	*os.File
	ADV
}

Meta represents the meta reader.

func NewMeta added in v0.7.0

func NewMeta() (meta *Meta, err error)

NewMeta initializes and returns a `Meta`.

func (*Meta) Read added in v0.7.0

func (m *Meta) Read(b []byte) (int, error)

func (*Meta) Revert added in v0.7.0

func (m *Meta) Revert() (err error)

Revert reverts the default bootloader label to the previous installation.

nolint: gocyclo

func (*Meta) Write added in v0.7.0

func (m *Meta) Write() (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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