Documentation ¶
Overview ¶
Package linux contains OS specific wrappers around package unix.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var KernelVersion = sync.OnceValues(detectKernelVersion)
KernelVersion returns the version of the currently running kernel.
Functions ¶
func FindKConfig ¶
FindKConfig searches for 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 KernelRelease ¶
KernelRelease returns the release string of the running kernel. Its format depends on the Linux distribution and corresponds to directory names in /lib/modules by convention. Some examples are 5.15.17-1-lts and 4.19.0-16-amd64.
func PlatformPrefix ¶
func PlatformPrefix() string
PlatformPrefix returns the platform-dependent syscall wrapper prefix used by the linux kernel.
Based on https://github.com/golang/go/blob/master/src/go/build/syslist.go and https://github.com/libbpf/libbpf/blob/master/src/libbpf.c#L10047
Types ¶
This section is empty.