Documentation ¶
Overview ¶
Package bootparam implements encoding and decoding of Linux kernel command lines as documented in https://docs.kernel.org/admin-guide/kernel-parameters.html
The format is quite quirky and thus the implementation is mostly based on the code in the Linux kernel implementing the decoder and not the specification.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Marshal ¶
Marshal encodes a set of kernel parameters and an optional rest string into a Linux kernel command line. It rejects data which is not encodable, which includes null bytes, double quotes in params as well as characters which contain 0xa0 in their UTF-8 representation (historical Linux quirk of treating that as a space, inherited from Latin-1).
func TrimLeftSpace ¶
TrimLeftSpace spaces as defined by Linux from the left of the string. This is only exported for tests, do not use this. Because of import loops as well as cgo restrictions this cannot be an internal function used by tests.
Types ¶
type Params ¶
type Params []Param
Params represents a list of kernel boot parameters
func Unmarshal ¶
Unmarshal decodes a Linux kernel command line and returns a list of kernel parameters as well as a rest section after the "--" parsing terminator.