mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
proc-cmdline: introduce PROC_CMDLINE_RD_STRICT
Our current set of flags allows an option to be either use just in initrd or both in initrd and normal system. This new flag is intended to be used in the case where you want apply some settings just in initrd or just in normal system.
This commit is contained in:
parent
e1e74614aa
commit
ed58820d76
@ -66,7 +66,8 @@ int proc_cmdline_parse_given(const char *line, proc_cmdline_parse_t parse_item,
|
||||
|
||||
if (flags & PROC_CMDLINE_STRIP_RD_PREFIX)
|
||||
key = q;
|
||||
}
|
||||
} else if (in_initrd() && flags & PROC_CMDLINE_RD_STRICT)
|
||||
continue;
|
||||
|
||||
value = strchr(key, '=');
|
||||
if (value)
|
||||
|
@ -8,6 +8,7 @@
|
||||
enum {
|
||||
PROC_CMDLINE_STRIP_RD_PREFIX = 1,
|
||||
PROC_CMDLINE_VALUE_OPTIONAL = 2,
|
||||
PROC_CMDLINE_RD_STRICT = 4
|
||||
};
|
||||
|
||||
typedef int (*proc_cmdline_parse_t)(const char *key, const char *value, void *data);
|
||||
|
Loading…
Reference in New Issue
Block a user