[systemd-commits] src/modules-load

Lennart Poettering lennart at kemper.freedesktop.org
Tue Feb 18 21:24:56 CET 2014


 src/modules-load/modules-load.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 4b462d1a28461b302586b117736ef288fba1012f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Feb 18 21:23:16 2014 +0100

    load-modules: properly return a failing error code if some module fails to load
    
    This is the missing part of b857193b1def5172e3641ca1d5bc9e08ae81aac4.

diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c
index 1a32d26..c3aa409 100644
--- a/src/modules-load/modules-load.c
+++ b/src/modules-load/modules-load.c
@@ -286,9 +286,11 @@ int main(int argc, char *argv[]) {
                                 r = k;
                 }
 
-                r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
-                if (r < 0) {
-                        log_error("Failed to enumerate modules-load.d files: %s", strerror(-r));
+                k = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
+                if (k < 0) {
+                        log_error("Failed to enumerate modules-load.d files: %s", strerror(-k));
+                        if (r == 0)
+                                r = k;
                         goto finish;
                 }
 



More information about the systemd-commits mailing list