]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/journal/journald-server.c
journald: make reading /dev/kmsg optional (#6362)
[thirdparty/systemd.git] / src / journal / journald-server.c
index 5dfc9013f5ece2846008c26ca4c102467cdccf22..6eb19e88669c1e4105626e37cf1f5c519c46ad4a 100644 (file)
@@ -1915,6 +1915,7 @@ int server_init(Server *s) {
         s->syslog_fd = s->native_fd = s->stdout_fd = s->dev_kmsg_fd = s->audit_fd = s->hostname_fd = s->notify_fd = -1;
         s->compress = true;
         s->seal = true;
+        s->read_kmsg = true;
 
         s->watchdog_usec = USEC_INFINITY;
 
@@ -2051,7 +2052,7 @@ int server_init(Server *s) {
         if (r < 0)
                 return r;
 
-        /* /dev/ksmg */
+        /* /dev/kmsg */
         r = server_open_dev_kmsg(s);
         if (r < 0)
                 return r;
@@ -2177,6 +2178,8 @@ void server_done(Server *s) {
         free(s->tty_path);
         free(s->cgroup_root);
         free(s->hostname_field);
+        free(s->runtime_storage.path);
+        free(s->system_storage.path);
 
         if (s->mmap)
                 mmap_cache_unref(s->mmap);