cmdline

package
v1.0.0-...-3f8fdb0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

The cmdline package provides a parser and convenience functions for reading configuration data from /proc/cmdline it's conformant with https://www.kernel.org/doc/html/v4.14/admin-guide/kernel-parameters.html, though making 'var_name' and 'var-name' equivalent may need to be done separately.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsFlag

func ContainsFlag(flag string) bool

ContainsFlag verifies that the kernel cmdline has a flag set

func Flag

func Flag(flag string) (string, bool)

Flag returns the a flag, and whether it was set

func FullCmdLine

func FullCmdLine() string

FullCmdLine returns the full, raw cmdline string

func GetInitFlagMap

func GetInitFlagMap() map[string]string

GetInitFlagMap gets the init flags as a map

func GetUinitFlagMap

func GetUinitFlagMap() map[string]string

GetUinitFlagMap gets the uinit flags as a map

Types

type CmdLine

type CmdLine struct {
	Raw   string
	AsMap map[string]string
	Err   error
}

CmdLine lets people view the raw & parsed /proc/cmdline in one place

func NewCmdLine

func NewCmdLine() CmdLine

NewCmdLine returns a populated CmdLine struct

Jump to

Keyboard shortcuts

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