Documentation ¶
Overview ¶
Package cmdline is parser for kernel command-line args 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 ¶
ContainsFlag verifies that the kernel cmdline has a flag set
func FlagsForModule ¶
FlagsForModule gets all flags for a designated module and returns them as a space-seperated string designed to be passed to insmod Note that similarly to flags, module names with - and _ are treated the same.
func GetInitFlagMap ¶
GetInitFlagMap gets the init flags as a map
Types ¶
type Filter ¶
type Filter interface { // Update filters a given space-separated kernel commandline Update(cmdline string) string }
Filter represents and kernel commandline filter
func NewUpdateFilter ¶
NewUpdateFilter return a kernel command line Filter that: removes variables listed in 'removeVar', append extra parameters from the 'appendCmd' and append variables listed in 'reuseVar' using the value from the running kernel