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:
Lukas Nykryn 2018-10-25 16:21:26 +02:00
parent e1e74614aa
commit ed58820d76
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -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);