kernel

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	Major       int
	Minor       int
	Patch       int
	VersionCode int
}

func CurrentKernelVersion

func CurrentKernelVersion() (*Version, error)

CurrentKernelVersion returns the current kernel version.

func KernelVersionFromReleaseString

func KernelVersionFromReleaseString(releaseString string) (Version, error)

KernelVersionFromReleaseString 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)

Jump to

Keyboard shortcuts

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