diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-10-19 16:45:23 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-10-20 14:09:32 +0200 |
commit | f882c1029daa63d7e99e8d3b5dd8dea3233bccfc (patch) | |
tree | 3ca411f37006abd0bc35286d43ae0b70a5ae03b0 /src/core/unit.c | |
parent | timer: Add two more helper functions (diff) | |
download | systemd-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.c | 12 |
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); |