1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 This file is part of systemd.
7 Copyright 2010 Lennart Poettering
15 PROC_CMDLINE_STRIP_RD_PREFIX = 1,
16 PROC_CMDLINE_VALUE_OPTIONAL = 2,
19 typedef int (*proc_cmdline_parse_t)(const char *key, const char *value, void *data);
21 int proc_cmdline(char **ret);
23 int proc_cmdline_parse(const proc_cmdline_parse_t parse, void *userdata, unsigned flags);
25 #if 0 /// UNNEEDED by elogind
26 int proc_cmdline_get_key(const char *parameter, unsigned flags, char **value);
27 int proc_cmdline_get_bool(const char *key, bool *ret);
29 char *proc_cmdline_key_startswith(const char *s, const char *prefix);
31 bool proc_cmdline_key_streq(const char *x, const char *y);
33 #if 0 /// UNNEEDED by elogind
34 int shall_restore_state(void);
35 const char* runlevel_to_target(const char *rl);
38 /* A little helper call, to be used in proc_cmdline_parse_t callbacks */
39 static inline bool proc_cmdline_value_missing(const char *key, const char *value) {
41 log_warning("Missing argument for %s= kernel command line switch, ignoring.", key);