summaryrefslogtreecommitdiff
path: root/sys-auth/elogind/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-19 20:11:46 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-19 20:11:46 +0000
commit5b5df25227111ef465caf5c52bcfb66dac3219cd (patch)
tree31b713cac6188358125cbb66b8804030328740f0 /sys-auth/elogind/files
parent02e2208f46f4e2c00fb9743cbc47350bdd233bfa (diff)
gentoo resync : 19.01.2018
Diffstat (limited to 'sys-auth/elogind/files')
-rw-r--r--sys-auth/elogind/files/elogind-235.2-legacy-cgroupmode.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/sys-auth/elogind/files/elogind-235.2-legacy-cgroupmode.patch b/sys-auth/elogind/files/elogind-235.2-legacy-cgroupmode.patch
new file mode 100644
index 000000000000..eb86e930f6f8
--- /dev/null
+++ b/sys-auth/elogind/files/elogind-235.2-legacy-cgroupmode.patch
@@ -0,0 +1,56 @@
+From 003ece760231aba0c661e2390dfd11075d72a8da Mon Sep 17 00:00:00 2001
+From: Sven Eden <yamakuzure@gmx.net>
+Date: Thu, 18 Jan 2018 23:01:12 +0100
+Subject: [PATCH] Prep v235.3 : Fix cgroup hierarchy detection code
+
+There is no sub-grouping with elogind, so /sys/fs/cgroup/elogind is
+not needed to be mounted as cgroup fs in legacy mode.
+
+Fixes Bug https://bugs.gentoo.org/644834
+---
+ src/basic/cgroup-util.c | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
+index 7f86c532c..cb60108ef 100644
+--- a/src/basic/cgroup-util.c
++++ b/src/basic/cgroup-util.c
+@@ -2550,28 +2550,31 @@ static int cg_unified_update(void) {
+
+ if (F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC))
+ unified_cache = CGROUP_UNIFIED_ALL;
++#if 0 /// The handling of cgroups is a bit different with elogind
+ else if (F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC)) {
++#else
++ else if (F_TYPE_EQUAL(fs.f_type, CGROUP_SUPER_MAGIC)
++ || F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC)) {
++#endif // 0
+ if (statfs("/sys/fs/cgroup/unified/", &fs) == 0 &&
+ F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) {
+ unified_cache = CGROUP_UNIFIED_SYSTEMD;
+ unified_systemd_v232 = false;
+ #if 0 /// elogind uses its own name
+ } else if (statfs("/sys/fs/cgroup/systemd/", &fs) == 0 &&
+- F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) {
+- unified_cache = CGROUP_UNIFIED_SYSTEMD;
+- unified_systemd_v232 = true;
+- } else {
+- if (statfs("/sys/fs/cgroup/systemd/", &fs) < 0)
+- return -errno;
+ #else
+ } else if (statfs("/sys/fs/cgroup/elogind/", &fs) == 0 &&
++#endif // 0
+ F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) {
+ unified_cache = CGROUP_UNIFIED_SYSTEMD;
+ unified_systemd_v232 = true;
+ } else {
+-#endif // 0
++#if 0 /// There is no sub-grouping within elogind
++ if (statfs("/sys/fs/cgroup/systemd/", &fs) < 0)
++ return -errno;
+ if (!F_TYPE_EQUAL(fs.f_type, CGROUP_SUPER_MAGIC))
+ return -ENOMEDIUM;
++#endif // 0
+ unified_cache = CGROUP_UNIFIED_NONE;
+ }
+ } else