machine

package
v4.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownArch = errors.New("architecture not recognized")

ErrUnknownArch is the error returned for unknown architecture.

Functions

func ArchFromContainer

func ArchFromContainer(container string) string

ArchFromContainer walks through a container filesystem until it find an elf binary to read target architecture from and returns it. If there is no suitable elf binary or if the architecture is not recognized it will return an empty string.

func ArchFromElf

func ArchFromElf(binary string) (string, error)

ArchFromElf returns the architecture string after inspection of the provided elf binary.

func CompatibleWith

func CompatibleWith(arch string) bool

CompatibleWith returns if the current machine architecture is compatible or can run via emulation the architecture passed in argument.

func SifArch added in v4.1.5

func SifArch(filename string) (string, error)

SifArch returns the architecture of the primary partition in a SIF file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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