summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-18 21:23:16 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-18 21:23:16 +0100
commit4b462d1a28461b302586b117736ef288fba1012f (patch)
tree140f1dbc94a1c01d4fd7562061c49c0af028fbc4 /src
parent6bebb0add4d7c32c503e688105c1607e5e20f979 (diff)
load-modules: properly return a failing error code if some module fails to load
This is the missing part of b857193b1def5172e3641ca1d5bc9e08ae81aac4.
Diffstat (limited to 'src')
-rw-r--r--src/modules-load/modules-load.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c
index 1a32d26b2d..c3aa409446 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;
}