1 /* Copyright (c) 2015 Google Inc
2 * Davide Libenzi <dlibenzi@google.com>
3 * See LICENSE for details.
11 * @brief Fetches a given boot commond line parameter.
13 * @param base The base pointer from which to start the search. Should be set
14 * to NULL the first time is being called, and, for command line
15 * parameters with multiple instances, should be set to the value
16 * returned by the previous successful call to this API.
17 * @param option The name of the option to retrieve. By convention, options
18 * should start with the '-' character.
19 * @param param The pointer to the buffer where to store the eventual value of
20 * the parameter (in a "-option=value" format). Can be NULL if the
21 * caller is not interested in the parameter value (because of a
22 * value-less parameter (example "-enable-acpi").
23 * @param max_param Maximum length of the @a param buffer, or 0 if @a param is
26 * @return Returns a pointer different from NULL if the given @a option has been
27 * successfully parsed, or NULL otherwise. The returned pointer should
28 * be treated as opaque value by the caller, and used only for the
29 * following calls to this API, in case of multiple instance parameters
30 * (example "-map=0x12345678,0x1000 -map=0x987654321,0x2000").
32 const char *get_boot_option(const char *base, const char *option, char *param,
35 void _panic(const char *file, int line, const char *fmt, ...);
36 void _warn(const char *file, int line, const char *fmt, ...);