]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/cgroup-util.c
core: make SYSTEMD_CGROUP_CONTROLLER a special string
authorTejun Heo <htejun@fb.com>
Mon, 21 Nov 2016 19:45:53 +0000 (14:45 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 18 Feb 2017 22:51:17 +0000 (17:51 -0500)
commitb6629c4b9f82f5801af186e975b0220bf066ddbe
tree23e89baf9c90615f92c0cc9af28f098b8146f2f7
parent415fc41ceaeada2e32639f24f134b1c248b9e43f
core: make SYSTEMD_CGROUP_CONTROLLER a special string

SYSTEMD_CGROUP_CONTROLLER is currently defined as "name=systemd" which cgroup
utility functions interpret as a named cgroup hierarchy with the specified
named.  With the planned cgroup hybrid mode changes, SYSTEMD_CGROUP_CONTROLLER
would map to different hierarchy names.

This patch makes SYSTEMD_CGROUP_CONTROLLER a special string "_systemd" which is
substituted to "name=systemd" by the cgroup utility functions.  This allows the
callers to address the systemd hierarchy without actually specifying the
hierarchy name allowing the cgroup utility functions to map it to whatever is
appropriate.

Note that SYSTEMD_CGROUP_CONTROLLER was already special on full unified cgroup
hierarchy even before this patch.
src/basic/cgroup-util.c
src/basic/def.h
src/core/cgroup.c