proc-cmdline: introduce new proc_cmdline_get_key_many() helper

This is like parse_env_file(), but from the kernel command line
This commit is contained in:
Lennart Poettering
2018-11-14 17:01:54 +01:00
parent 1e7a599671
commit 78b30ee056
3 changed files with 78 additions and 0 deletions
+3
View File
@@ -21,6 +21,9 @@ int proc_cmdline_parse(const proc_cmdline_parse_t parse, void *userdata, ProcCmd
int proc_cmdline_get_key(const char *parameter, ProcCmdlineFlags flags, char **value);
int proc_cmdline_get_bool(const char *key, bool *ret);
int proc_cmdline_get_key_many_internal(ProcCmdlineFlags flags, ...);
#define proc_cmdline_get_key_many(flags, ...) proc_cmdline_get_key_many_internal(flags, __VA_ARGS__, NULL)
char *proc_cmdline_key_startswith(const char *s, const char *prefix);
bool proc_cmdline_key_streq(const char *x, const char *y);