package kconfig

import "github.com/cilium/ebpf/internal/kconfig"

Index

Constants

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

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 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.

Source Files

kconfig.go

Version
v0.12.1
Published
Oct 19, 2023
Platform
windows/amd64
Imports
11 packages
Last checked
3 minutes ago

Tools for package owners.