]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: log in all cases in manager_startup()
authorLennart Poettering <lennart@poettering.net>
Tue, 9 Oct 2018 15:16:08 +0000 (17:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 9 Oct 2018 17:43:43 +0000 (19:43 +0200)
We missed some cases where we'd fail without any logging at all. Let's
fix that.

src/analyze/analyze-verify.c
src/core/main.c
src/core/manager.c

index d2f9e5528ee653eb27dad95303f58444923ddb6a..402203a3c79960ee3082fdd479dcaa934428f060 100644 (file)
@@ -254,7 +254,7 @@ int verify_units(char **filenames, UnitFileScope scope, bool check_man, bool run
 
         r = manager_startup(m, NULL, NULL);
         if (r < 0)
-                return log_error_errno(r, "Failed to start manager: %m");
+                return r;
 
         manager_clear_jobs(m);
 
index 672422e155a830c06af5bd46d2b65221cd653fbd..2810e88109896fbc7e9682de4758c44127be2642 100644 (file)
@@ -2427,7 +2427,6 @@ int main(int argc, char *argv[]) {
 
         r = manager_startup(m, arg_serialization, fds);
         if (r < 0) {
-                log_error_errno(r, "Failed to fully start up daemon: %m");
                 error_message = "Failed to start up manager";
                 goto finish;
         }
index 947c98265794bb56748bf4ae4e2fff2edd43f634..cbb9ec6924b2c469df9fcf06f0c1346a47b97be9 100644 (file)
@@ -1592,7 +1592,7 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
                               MANAGER_IS_TEST_RUN(m) ? LOOKUP_PATHS_TEMPORARY_GENERATED : 0,
                               NULL);
         if (r < 0)
-                return r;
+                return log_error_errno(r, "Failed to initialize path lookup table: %m");
 
         r = manager_run_environment_generators(m);
         if (r < 0)
@@ -1605,7 +1605,11 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
                 return r;
 
         manager_preset_all(m);
-        lookup_paths_reduce(&m->lookup_paths);
+
+        r = lookup_paths_reduce(&m->lookup_paths);
+        if (r < 0)
+                log_warning_errno(r, "Failed ot reduce unit file paths, ignoring: %m");
+
         manager_build_unit_path_cache(m);
 
         /* If we will deserialize make sure that during enumeration
@@ -1654,7 +1658,9 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
         manager_setup_bus(m);
 
         /* Now that we are connected to all possible busses, let's deserialize who is tracking us. */
-        (void) bus_track_coldplug(m, &m->subscribed, false, m->deserialized_subscribed);
+        r = bus_track_coldplug(m, &m->subscribed, false, m->deserialized_subscribed);
+        if (r < 0)
+                log_warning_errno(r, "Failed to deserialized tracked clients, ignoring: %m");
         m->deserialized_subscribed = strv_free(m->deserialized_subscribed);
 
         /* Third, fire things up! */