class Commandline
Defined at line 17 of file ../../src/firmware/gigaboot/cpp/cmdline.h
Helper class for constructing, manipulating, and querying the kernel command line.
Public Members
static const size_t kMaxCmdlineItems
static const size_t kCmdlineStrSize
static const size_t kCmdlineMaxArgSize
Public Methods
zx::result<size_t> ToString (std::span<char> cmdline)
Given an empty buffer, serialize the command line to a string.
If successful, returns the length of the command line string.
Defined at line 75 of file ../../src/firmware/gigaboot/cpp/cmdline.cc
zx::result<size_t> ToString (std::span<char> cmdline)
Given an empty buffer, serialize the command line to a string.
If successful, returns the length of the command line string.
Defined at line 75 of file ../../src/firmware/gigaboot/cpp/cmdline.cc
bool Add (const std::string_view key, const std::string_view val)
Add or update a flag or key/value entry to the command line.
Returns true on success.
Postcondition: key and val remain valid and unmodified at least as long as this instance.
Defined at line 14 of file ../../src/firmware/gigaboot/cpp/cmdline.cc
bool Add (const std::string_view key, const std::string_view val)
Add or update a flag or key/value entry to the command line.
Returns true on success.
Postcondition: key and val remain valid and unmodified at least as long as this instance.
Defined at line 14 of file ../../src/firmware/gigaboot/cpp/cmdline.cc
bool AppendItems (const std::string_view cmdline)
Given a string representing a command line,
parse the string into an internal representation
so that command line items can be updated and queried.
Returns true on success.
Postcondition: cmdline remains valid and unmodified at least as long as this instance.
Defined at line 45 of file ../../src/firmware/gigaboot/cpp/cmdline.cc
bool AppendItems (const std::string_view cmdline)
Given a string representing a command line,
parse the string into an internal representation
so that command line items can be updated and queried.
Returns true on success.
Postcondition: cmdline remains valid and unmodified at least as long as this instance.
Defined at line 45 of file ../../src/firmware/gigaboot/cpp/cmdline.cc
const std::string_view Get (const std::string_view key, const std::string_view _default)
Given a parameter name, returns the associated value if present,
or the provided default if not present.
Defined at line 37 of file ../../src/firmware/gigaboot/cpp/cmdline.cc
const std::string_view Get (const std::string_view key, const std::string_view _default)
Given a parameter name, returns the associated value if present,
or the provided default if not present.
Defined at line 37 of file ../../src/firmware/gigaboot/cpp/cmdline.cc