diff options
Diffstat (limited to 'src/dbus-unit.c')
-rw-r--r-- | src/dbus-unit.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/dbus-unit.c b/src/dbus-unit.c index 519aa5c3e8..eab816ac93 100644 --- a/src/dbus-unit.c +++ b/src/dbus-unit.c @@ -205,6 +205,24 @@ int bus_unit_append_can_reload(Manager *m, DBusMessageIter *i, const char *prope return 0; } +int bus_unit_append_can_isolate(Manager *m, DBusMessageIter *i, const char *property, void *data) { + Unit *u = data; + dbus_bool_t b; + + assert(m); + assert(i); + assert(property); + assert(u); + + b = unit_can_isolate(u) && + !u->meta.refuse_manual_start; + + if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b)) + return -ENOMEM; + + return 0; +} + int bus_unit_append_job(Manager *m, DBusMessageIter *i, const char *property, void *data) { Unit *u = data; DBusMessageIter sub; |