diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-24 18:00:04 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-02-24 18:00:04 +0100 |
commit | c22800e40e1709e4794308114543f6d6d419e4ae (patch) | |
tree | ba30e777016191d2e2bd48ea59f41345293e5c29 /src/nspawn | |
parent | b4cccbc13ad6f98bd8e816ce5fffb99f5be74c8c (diff) |
cgroup: rename cg_unified() → cg_unified_controller()
cg_unified() is a bit generic a name, let's make clear that it checks
whether a specified controller is in unified mode.
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn-cgroup.c | 4 | ||||
-rw-r--r-- | src/nspawn/nspawn.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c index 3ca067e5bc..d749756437 100644 --- a/src/nspawn/nspawn-cgroup.c +++ b/src/nspawn/nspawn-cgroup.c @@ -80,7 +80,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t arg_uid_shift) const char *fn; int r, unified_controller; - unified_controller = cg_unified(SYSTEMD_CGROUP_CONTROLLER); + unified_controller = cg_unified_controller(SYSTEMD_CGROUP_CONTROLLER); if (unified_controller < 0) return log_error_errno(unified_controller, "Failed to determine whether the systemd hierarchy is unified: %m"); if ((unified_controller > 0) == (unified_requested >= CGROUP_UNIFIED_SYSTEMD)) @@ -153,7 +153,7 @@ int create_subcgroup(pid_t pid, CGroupUnified unified_requested) { if (unified_requested == CGROUP_UNIFIED_NONE) return 0; - r = cg_unified(SYSTEMD_CGROUP_CONTROLLER); + r = cg_unified_controller(SYSTEMD_CGROUP_CONTROLLER); if (r < 0) return log_error_errno(r, "Failed to determine whether the systemd controller is unified: %m"); if (r == 0) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 46d4edd4da..52cda514ab 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -346,7 +346,7 @@ static int detect_unified_cgroup_hierarchy(const char *directory) { arg_unified_cgroup_hierarchy = CGROUP_UNIFIED_ALL; else arg_unified_cgroup_hierarchy = CGROUP_UNIFIED_NONE; - } else if (cg_unified(SYSTEMD_CGROUP_CONTROLLER) > 0) { + } else if (cg_unified_controller(SYSTEMD_CGROUP_CONTROLLER) > 0) { /* Mixed cgroup hierarchy support was added in 233 */ r = systemd_installation_has_version(directory, 233); if (r < 0) |