summaryrefslogtreecommitdiff
path: root/src/hostname
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-04-21 10:34:05 +0200
committerLennart Poettering <lennart@poettering.net>2020-04-21 17:08:16 +0200
commitac9f55ed407f2994e22422f39456a2f68027c39a (patch)
treef3f0230d0c7af639e4855d6aeed9eb88068d2d7f /src/hostname
parent4c4520789d2bfa3fa51b38b826cac2efb5a4d252 (diff)
downloadsystemd-ac9f55ed407f2994e22422f39456a2f68027c39a.tar.gz
tree-wide: implement new log control API dbus interface in all our daemons
Diffstat (limited to 'src/hostname')
-rw-r--r--src/hostname/hostnamed.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index 66af1c0b5c..5b4c74e299 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -8,6 +8,7 @@
#include "alloc-util.h"
#include "bus-common-errors.h"
+#include "bus-log-control-api.h"
#include "bus-polkit.h"
#include "def.h"
#include "env-file-label.h"
@@ -754,6 +755,10 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
if (r < 0)
return log_error_errno(r, "Failed to register object: %m");
+ r = bus_log_control_api_register(bus);
+ if (r < 0)
+ return r;
+
r = sd_bus_request_name_async(bus, NULL, "org.freedesktop.hostname1", 0, NULL, NULL);
if (r < 0)
return log_error_errno(r, "Failed to request name: %m");