ffs

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: BSD-3-Clause Imports: 10 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node struct {
	fianoUEFI.Firmware
	pkgbytes.Range

	// AddOffset adds the value to all offsets.
	// It, for example, affects GetByRange accordingly.
	//
	// It does effect only if a method of this node directly is used.
	AddOffset int64
}

func (Node) GUID

func (node Node) GUID() *fianoGUID.GUID

func (*Node) GetByGUID

func (node *Node) GetByGUID(guid fianoGUID.GUID) (nodes []*Node, err error)

GetByGUID returns UEFI tree nodes with guid `guid`.

func (*Node) GetByRange

func (node *Node) GetByRange(byteRange pkgbytes.Range) (nodes []*Node, err error)

GetByRange returns nodes which overlaps the range `byteRange`.

func (*Node) GetByRegionType

func (node *Node) GetByRegionType(regionType fianoUEFI.FlashRegionType) (nodes []*Node, err error)

GetByRegionType returns UEFI tree nodes of the requested flash region type.

func (*Node) GetNamesByRange

func (node *Node) GetNamesByRange(byteRange pkgbytes.Range) []string

GetNamesByRange returns known names of volumes which intersects with the selected byte range.

Since there's no reliable enough way to get volume offsets, we introduce this function to be able to extract at least names in a little-bit more reliable manner.

This function should be deprecated after issue https://github.com/linuxboot/fiano/issues/164 will be closed.

func (Node) ModuleName

func (node Node) ModuleName() *string

ModuleName returns the module name. In TianoCore it's called "BASE_NAME".

Returns nil if this node has no module name.

func (*Node) NameToRangesMap

func (node *Node) NameToRangesMap() map[string]pkgbytes.Ranges

NameToRangesMap returns a map which maps node ID ("nameString") to its Range.

If the node has GUID then "ID" is the GUID. If not, then the node is identified by its type in format ("node/"+typeName).

Since multiple nodes may have the same GUID (and especially the same type), we enumerate nodes with the same "ID".

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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