diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-10-24 21:41:54 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-11-02 11:29:59 -0600 |
commit | f5869324e303a136d7ca802769e8966e8eb26d56 (patch) | |
tree | b8a55d4cb7c3281ad53fd7672dbc9ab814c8e9df /src/core/unit.h | |
parent | bbeea271172a4664ce9a4a41a7fa3b1ca18dbedd (diff) |
core: rework the "no_gc" unit flag to become a more generic "perpetual" flag
So far "no_gc" was set on -.slice and init.scope, to units that are always
running, cannot be stopped and never exist in an "inactive" state. Since these
units are the only users of this flag, let's remodel it and rename it
"perpetual" and let's derive more funcitonality off it. Specifically, refuse
enqueing stop jobs for these units, and report that they are "unstoppable" in
the CanStop bus property.
Diffstat (limited to 'src/core/unit.h')
-rw-r--r-- | src/core/unit.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/unit.h b/src/core/unit.h index adcdee6db6..e524553ed3 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -236,6 +236,9 @@ struct Unit { /* Is this a transient unit? */ bool transient; + /* Is this a unit that is always running and cannot be stopped? */ + bool perpetual; + bool in_load_queue:1; bool in_dbus_queue:1; bool in_cleanup_queue:1; @@ -244,8 +247,6 @@ struct Unit { bool sent_dbus_new_signal:1; - bool no_gc:1; - bool in_audit:1; bool cgroup_realized:1; @@ -524,6 +525,7 @@ void unit_dump(Unit *u, FILE *f, const char *prefix); bool unit_can_reload(Unit *u) _pure_; bool unit_can_start(Unit *u) _pure_; +bool unit_can_stop(Unit *u) _pure_; bool unit_can_isolate(Unit *u) _pure_; int unit_start(Unit *u); |