summaryrefslogtreecommitdiff
path: root/src/modules-load
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-14 19:48:04 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-01-14 21:29:27 -0500
commit6b3d378331fe714c7bf2263eaa9a8b33fc878e7c (patch)
tree5fca867e0b2cda62c2dc4f1a9a4bd78ab345b158 /src/modules-load
parentab8864ebc3ac01288729b44f0d5f18fff37defb5 (diff)
parentbafbac4e85a5eefd4b57a5cd0eb61885fb60edc9 (diff)
Merge pull request #4879 from poettering/systemd
Diffstat (limited to 'src/modules-load')
-rw-r--r--src/modules-load/modules-load.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c
index 0901fea8dc..615998a6f6 100644
--- a/src/modules-load/modules-load.c
+++ b/src/modules-load/modules-load.c
@@ -62,7 +62,11 @@ static int add_modules(const char *p) {
static int parse_proc_cmdline_item(const char *key, const char *value, void *data) {
int r;
- if (streq(key, "modules-load") && value) {
+ if (proc_cmdline_key_streq(key, "modules_load")) {
+
+ if (proc_cmdline_value_missing(key, value))
+ return 0;
+
r = add_modules(value);
if (r < 0)
return r;
@@ -226,7 +230,7 @@ int main(int argc, char *argv[]) {
umask(0022);
- r = parse_proc_cmdline(parse_proc_cmdline_item, NULL, true);
+ r = proc_cmdline_parse(parse_proc_cmdline_item, NULL, PROC_CMDLINE_STRIP_RD_PREFIX);
if (r < 0)
log_warning_errno(r, "Failed to parse kernel command line, ignoring: %m");