kernel

package
v3.0.77 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: AGPL-3.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentRelease

func CurrentRelease() (string, error)

CurrentRelease returns the current kernel release ensuring that ubuntu and debian release numbers are accurate.

func CurrentVersion

func CurrentVersion() (uint32, error)

CurrentVersion returns the current kernel version in LINUX_VERSION_CODE format (see VersionFromRelease())

func Version

func Version(major, minor, patch int) uint32

Version implements KERNEL_VERSION equivalent macro #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))

func VersionFromRelease

func VersionFromRelease(releaseString string) (uint32, error)

VersionFromRelease converts a release string with format 4.4.2[-1] to a kernel version number in LINUX_VERSION_CODE format. That is, for kernel "a.b.c", the version number will be (a<<16 + b<<8 + c)

Types

This section is empty.

Jump to

Keyboard shortcuts

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