From: Lennart Poettering Date: Tue, 9 Oct 2018 14:47:30 +0000 (+0200) Subject: core: make sure manager_run_generators() logs about all errors X-Git-Tag: v240~585^2~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7eb4f326121b4f88c02660ca0aad35c316cd6b80;p=thirdparty%2Fsystemd.git core: make sure manager_run_generators() logs about all errors Since it's mostly a wrapper around execute_directories() it already logs in most cases, but a few were missing. Fix that. --- diff --git a/src/core/manager.c b/src/core/manager.c index c41d88f3f6c..e57d9555296 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -3831,8 +3831,10 @@ static int manager_run_generators(Manager *m) { return 0; r = lookup_paths_mkdir_generator(&m->lookup_paths); - if (r < 0) + if (r < 0) { + log_error_errno(r, "Failed to create generator directories: %m"); goto finish; + } argv[0] = NULL; /* Leave this empty, execute_directory() will fill something in */ argv[1] = m->lookup_paths.generator; @@ -3841,8 +3843,10 @@ static int manager_run_generators(Manager *m) { argv[4] = NULL; RUN_WITH_UMASK(0022) - execute_directories((const char* const*) paths, DEFAULT_TIMEOUT_USEC, - NULL, NULL, (char**) argv, m->environment); + (void) execute_directories((const char* const*) paths, DEFAULT_TIMEOUT_USEC, + NULL, NULL, (char**) argv, m->environment); + + r = 0; finish: lookup_paths_trim_generator(&m->lookup_paths);