diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-16 04:36:06 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-16 04:41:21 +0200 |
commit | 7027ff61a34a12487712b382a061c654acc3a679 (patch) | |
tree | 05e9374a566d6accdd962dd4dc6d7076b9304122 /src/systemd/sd-login.h | |
parent | cec4ead904978b07db2154c618eeb48d3102da66 (diff) |
nspawn: introduce the new /machine/ tree in the cgroup tree and move containers there
Containers will now carry a label (normally derived from the root
directory name, but configurable by the user), and the container's root
cgroup is /machine/<label>. This label is called "machine name", and can
cover both containers and VMs (as soon as libvirt also makes use of
/machine/).
libsystemd-login can be used to query the machine name from a process.
This patch also includes numerous clean-ups for the cgroup code.
Diffstat (limited to 'src/systemd/sd-login.h')
-rw-r--r-- | src/systemd/sd-login.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/systemd/sd-login.h b/src/systemd/sd-login.h index 11282b761..1083742be 100644 --- a/src/systemd/sd-login.h +++ b/src/systemd/sd-login.h @@ -64,12 +64,16 @@ int sd_pid_get_owner_uid(pid_t pid, uid_t *uid); /* Get systemd unit (i.e. service) name from PID, for system * services. This will return an error for non-service processes. */ -int sd_pid_get_unit(pid_t, char **unit); +int sd_pid_get_unit(pid_t pid, char **unit); /* Get systemd unit (i.e. service) name from PID, for user * services. This will return an error for non-user-service * processes. */ -int sd_pid_get_user_unit(pid_t, char **unit); +int sd_pid_get_user_unit(pid_t pid, char **unit); + +/* Get machine name from PID, for processes assigned to VM or + * container. This will return an error for non-service processes. */ +int sd_pid_get_machine_name(pid_t pid, char **name); /* Get state from uid. Possible states: offline, lingering, online, active, closing */ int sd_uid_get_state(uid_t uid, char**state); |