Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrBootloader is returned if the bootloader can not be determined ErrBootloader = errors.New("cannot determine bootloader") )
Functions ¶
func Force ¶
func Force(booloader Bootloader)
Force can be used to force setting a booloader to that Find will not use the usual lookup process; use nil to reset to normal lookup.
func ForceError ¶
func ForceError(err error)
Force can be used to force Find to return an error; use nil to reset to normal lookup.
func InstallBootConfig ¶
InstallBootConfig installs the bootloader config from the gadget snap dir into the right place.
Types ¶
type Bootloader ¶
type Bootloader interface { // Return the value of the specified bootloader variable GetBootVars(names ...string) (map[string]string, error) // Set the value of the specified bootloader variable SetBootVars(values map[string]string) error // Name returns the bootloader name Name() string // ConfigFile returns the name of the config file ConfigFile() string // ExtractKernelAssets extracts kernel assets from the given kernel snap ExtractKernelAssets(s snap.PlaceInfo, snapf snap.Container) error // RemoveKernelAssets removes the assets for the given kernel snap. RemoveKernelAssets(s snap.PlaceInfo) error }
Bootloader provides an interface to interact with the system bootloader
Click to show internal directories.
Click to hide internal directories.