diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-08-30 22:45:46 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-08-30 23:04:36 +0200 |
commit | 2528a7a62c4ad9b2f4773b608d208239299da50c (patch) | |
tree | de5fa60c236e8da0df509d1583fb5369ae66828f /src/dbus-unit.c | |
parent | b2bb3dbed9607c440b1a9ccacc515e28136d39ae (diff) |
unit: introduce AllowIsolate= switch
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; |