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/unit.c | |
parent | b2bb3dbed9607c440b1a9ccacc515e28136d39ae (diff) |
unit: introduce AllowIsolate= switch
Diffstat (limited to 'src/unit.c')
-rw-r--r-- | src/unit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/unit.c b/src/unit.c index 34bfd3f64c..33696477a9 100644 --- a/src/unit.c +++ b/src/unit.c @@ -812,6 +812,13 @@ bool unit_can_start(Unit *u) { return !!UNIT_VTABLE(u)->start; } +bool unit_can_isolate(Unit *u) { + assert(u); + + return unit_can_start(u) && + u->meta.allow_isolate; +} + /* Errors: * -EBADR: This unit type does not support stopping. * -EALREADY: Unit is already stopped. |