kernel

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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