chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
unit: introduce AllowIsolate= switch
[elogind.git]
/
src
/
unit.c
diff --git
a/src/unit.c
b/src/unit.c
index 34bfd3f64cd74a4f82e23de09ece3afb0bec9948..33696477a9a3d146868e322a726a162fe37331cc 100644
(file)
--- 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.