summaryrefslogtreecommitdiff
path: root/src/core/busname.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/busname.c')
-rw-r--r--src/core/busname.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/busname.c b/src/core/busname.c
index d4aa463397..838171fe23 100644
--- a/src/core/busname.c
+++ b/src/core/busname.c
@@ -971,6 +971,16 @@ static int busname_get_timeout(Unit *u, uint64_t *timeout) {
return 1;
}
+static bool busname_supported(Manager *m) {
+ int supported = -1;
+ assert(m);
+
+ if (supported < 0)
+ supported = access("/sys/fs/kdbus", F_OK) >= 0;
+
+ return supported;
+}
+
static const char* const busname_state_table[_BUSNAME_STATE_MAX] = {
[BUSNAME_DEAD] = "dead",
[BUSNAME_MAKING] = "making",
@@ -1032,6 +1042,8 @@ const UnitVTable busname_vtable = {
.reset_failed = busname_reset_failed,
+ .supported = busname_supported,
+
.bus_interface = "org.freedesktop.systemd1.BusName",
.bus_vtable = bus_busname_vtable,