chiark / gitweb /
unit: introduce AllowIsolate= switch
[elogind.git] / src / unit.c
index 34bfd3f64cd74a4f82e23de09ece3afb0bec9948..33696477a9a3d146868e322a726a162fe37331cc 100644 (file)
@@ -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.