richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
9fc0f6
From 15010ca4aa6627c7bcfe8106fa45c4408443d5f2 Mon Sep 17 00:00:00 2001
9fc0f6
From: Lennart Poettering <lennart@poettering.net>
9fc0f6
Date: Wed, 2 Oct 2013 19:37:44 +0200
9fc0f6
Subject: [PATCH] modules-load: fix error handling
9fc0f6
9fc0f6
---
9fc0f6
 src/modules-load/modules-load.c | 4 ++--
9fc0f6
 1 file changed, 2 insertions(+), 2 deletions(-)
9fc0f6
9fc0f6
diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c
9fc0f6
index 7b19ee0..49ee420 100644
9fc0f6
--- a/src/modules-load/modules-load.c
9fc0f6
+++ b/src/modules-load/modules-load.c
9fc0f6
@@ -302,8 +302,8 @@ int main(int argc, char *argv[]) {
9fc0f6
 
9fc0f6
                 STRV_FOREACH(i, arg_proc_cmdline_modules) {
9fc0f6
                         k = load_module(ctx, *i);
9fc0f6
-                        if (k < 0)
9fc0f6
-                                r = EXIT_FAILURE;
9fc0f6
+                        if (k < 0 && r == 0)
9fc0f6
+                                r = k;
9fc0f6
                 }
9fc0f6
 
9fc0f6
                 r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);