kernel

package
v1.30.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 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)

func (Version) String added in v1.23.0

func (v Version) String() string

Jump to

Keyboard shortcuts

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