unit: Move three helpers to unit.h

This commit is contained in:
Daan De Meyer
2023-10-20 14:09:32 +02:00
parent f8a990a0a1
commit f882c1029d
3 changed files with 16 additions and 12 deletions
+12
View File
@@ -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);