efivars

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: Apache-2.0 Imports: 12 Imported by: 2

Documentation

Index

Constants

View Source
const (
	BootNextName    = "BootNext"
	BootCurrentName = "BootCurrent"
	BootOrderName   = "BootOrder"
)

Variables

View Source
var (
	// BootNext specifies the first boot option on the next boot.
	//
	// <https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf#G7.1346720>
	BootNext = Variable[uint16]{
				// contains filtered or unexported fields
	}

	// BootCurrent defines the Boot#### option that was selected
	// on the current boot.
	//
	// <https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf#G7.1346720>
	BootCurrent = Variable[uint16]{
				// contains filtered or unexported fields
	}

	// BootOrder is an ordered list of the Boot#### options.
	//
	// The first element in the array is the value for the first
	// logical boot option, the second element is the value for
	// the second logical boot option, etc. The BootOrder order
	// list is used by the firmware’s boot manager as the default
	// boot order.
	//
	// <https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf#G7.1346720>
	BootOrder = Variable[[]uint16]{
				// contains filtered or unexported fields
	}
)
View Source
var (
	GlobalVariable = efiguid.New(0x8be4df61, 0x93ca, 0x11d2, [8]byte{0xaa, 0x0d, 0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c})
)

Functions

This section is empty.

Types

type BootEntry added in v0.4.0

type BootEntry struct {
	Index    uint16
	Variable Variable[*efitypes.LoadOption]
}

BootEntry describes a Boot efitypes.LoadOption value.

type BootEntryIterator added in v0.4.0

type BootEntryIterator struct {
	// contains filtered or unexported fields
}

BootEntryIterator is an iterator yielding currently configured Boot efitypes.LoadOption values.

func BootIterator added in v0.4.0

func BootIterator(ctx efivario.Context) (*BootEntryIterator, error)

func (*BootEntryIterator) Close added in v0.4.0

func (it *BootEntryIterator) Close() error

func (*BootEntryIterator) Err added in v0.4.0

func (it *BootEntryIterator) Err() error

func (*BootEntryIterator) Iter added in v0.6.0

func (*BootEntryIterator) Next added in v0.4.0

func (it *BootEntryIterator) Next() bool

func (*BootEntryIterator) Value added in v0.4.0

func (it *BootEntryIterator) Value() *BootEntry

type MarshalFn added in v0.3.0

type MarshalFn[T any] func(w io.Writer, inp T) error

type UnmarshalFn added in v0.3.0

type UnmarshalFn[T any] func(r io.Reader) (T, error)

type Variable

type Variable[T any] struct {
	// contains filtered or unexported fields
}

func Boot

Boot returns an EFI Variable pointing to the boot LoadOption for the given index.

<https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf#G7.1346720>

func (Variable[T]) Get

func (e Variable[T]) Get(c efivario.Context) (attrs efivario.Attributes, value T, err error)

func (Variable[T]) Set

func (e Variable[T]) Set(c efivario.Context, value T) error

func (Variable[T]) SetWithAttributes

func (e Variable[T]) SetWithAttributes(c efivario.Context, attrs efivario.Attributes, value T) error

Jump to

Keyboard shortcuts

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