]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journald: add missing logging for some errors
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Nov 2019 13:00:40 +0000 (14:00 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 31 Jan 2020 14:00:21 +0000 (15:00 +0100)
src/journal/journald-server.c

index 305a5eff377287d5628e7da8238d0c0c4eccdb0b..286dda29716b2915171d71ad927604c5bfe948d2 100644 (file)
@@ -2177,11 +2177,11 @@ int server_init(Server *s) {
 
         s->ratelimit = journal_ratelimit_new();
         if (!s->ratelimit)
-                return -ENOMEM;
+                return log_oom();
 
         r = cg_get_root_path(&s->cgroup_root);
         if (r < 0)
-                return r;
+                return log_error_errno(r, "Failed to acquire cgroup root path: %m");
 
         server_cache_hostname(s);
         server_cache_boot_id(s);
@@ -2190,7 +2190,7 @@ int server_init(Server *s) {
         s->runtime_storage.path = path_join("/run/log/journal", SERVER_MACHINE_ID(s));
         s->system_storage.path  = path_join("/var/log/journal", SERVER_MACHINE_ID(s));
         if (!s->runtime_storage.path || !s->system_storage.path)
-                return -ENOMEM;
+                return log_oom();
 
         (void) server_connect_notify(s);