diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-06-20 03:45:08 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-06-20 03:49:59 +0200 |
commit | 9444b1f20e311f073864d81e913bd4f32fe95cfd (patch) | |
tree | 7b4752c690729df0acec75c9eb2382026bbf6899 /src/core/unit.h | |
parent | 77f40f165cc60a1d6b8a3503e4b7e46814d5935e (diff) |
logind: add infrastructure to keep track of machines, and move to slices
- This changes all logind cgroup objects to use slice objects rather
than fixed croup locations.
- logind can now collect minimal information about running
VMs/containers. As fixed cgroup locations can no longer be used we
need an entity that keeps track of machine cgroups in whatever slice
they might be located. Since logind already keeps track of users,
sessions and seats this is a trivial addition.
- nspawn will now register with logind and pass various bits of metadata
along. A new option "--slice=" has been added to place the container
in a specific slice.
- loginctl gained commands to list, introspect and terminate machines.
- user.slice and machine.slice will now be pulled in by logind.service,
since only logind.service requires this slice.
Diffstat (limited to 'src/core/unit.h')
-rw-r--r-- | src/core/unit.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/unit.h b/src/core/unit.h index 81b8adbfdc..da52101bd2 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -542,6 +542,8 @@ void unit_reset_failed(Unit *u); Unit *unit_following(Unit *u); +const char *unit_slice_name(Unit *u); + bool unit_stop_pending(Unit *u) _pure_; bool unit_inactive_or_pending(Unit *u) _pure_; bool unit_active_or_pending(Unit *u); @@ -563,6 +565,7 @@ Unit* unit_ref_set(UnitRef *ref, Unit *u); void unit_ref_unset(UnitRef *ref); #define UNIT_DEREF(ref) ((ref).unit) +#define UNIT_ISSET(ref) (!!(ref).unit) int unit_add_one_mount_link(Unit *u, Mount *m); int unit_add_mount_links(Unit *u); |