summaryrefslogtreecommitdiffstats
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-10-19 16:45:23 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-10-20 14:09:32 +0200
commitf882c1029daa63d7e99e8d3b5dd8dea3233bccfc (patch)
tree3ca411f37006abd0bc35286d43ae0b70a5ae03b0 /src/core/unit.c
parenttimer: Add two more helper functions (diff)
downloadsystemd-f882c1029daa63d7e99e8d3b5dd8dea3233bccfc.tar.xz
systemd-f882c1029daa63d7e99e8d3b5dd8dea3233bccfc.zip
unit: Move three helpers to unit.h
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index a60656709a..d76e86e5f3 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -6167,6 +6167,18 @@ int unit_can_clean(Unit *u, ExecCleanMask *ret) {
return UNIT_VTABLE(u)->can_clean(u, ret);
}
+bool unit_can_start_refuse_manual(Unit *u) {
+ return unit_can_start(u) && !u->refuse_manual_start;
+}
+
+bool unit_can_stop_refuse_manual(Unit *u) {
+ return unit_can_stop(u) && !u->refuse_manual_stop;
+}
+
+bool unit_can_isolate_refuse_manual(Unit *u) {
+ return unit_can_isolate(u) && !u->refuse_manual_start;
+}
+
bool unit_can_freeze(Unit *u) {
assert(u);