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 int proc_cmdline_get_key(const char *parameter
, unsigned flags
, char **value
);
26 int proc_cmdline_get_bool(const char *key
, bool *ret
);
28 char *proc_cmdline_key_startswith(const char *s
, const char *prefix
);
29 bool proc_cmdline_key_streq(const char *x
, const char *y
);
31 int shall_restore_state(void);
32 const char* runlevel_to_target(const char *rl
);
34 /* A little helper call, to be used in proc_cmdline_parse_t callbacks */
35 static inline bool proc_cmdline_value_missing(const char *key
, const char *value
) {
37 log_warning("Missing argument for %s= kernel command line switch, ignoring.", key
);