kconfig

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TriNo     triState = 0
	TriYes    triState = 1
	TriModule triState = 2
)

Variables

This section is empty.

Functions

func Find

func Find() (*os.File, error)

Find find a kconfig file on the host. It first reads from /boot/config- of the current running kernel and tries /proc/config.gz if nothing was found in /boot. If none of the file provide a kconfig, it returns an error.

func Parse

func Parse(source io.ReaderAt, filter map[string]struct{}) (map[string]string, error)

Parse parses the kconfig file for which a reader is given. All the CONFIG_* which are in filter and which are set set will be put in the returned map as key with their corresponding value as map value. If filter is nil, no filtering will occur. If the kconfig file is not valid, error will be returned.

func PutInteger added in v0.12.3

func PutInteger(data []byte, integer *btf.Int, n uint64) error

PutInteger writes n into data.

integer determines how much is written into data and what the valid values are.

func PutValue

func PutValue(data []byte, typ btf.Type, value string) error

PutValue translates the value given as parameter depending on the BTF type, the translated value is then written to the byte array.

Types

This section is empty.

Jump to

Keyboard shortcuts

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