summaryrefslogtreecommitdiff
path: root/src/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unit.c')
-rw-r--r--src/unit.c7
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.