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