chiark / gitweb /
Rename cg_is_unified_elogind_controller_wanted to cg_is_hybrid_wanted
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 19 Feb 2017 20:36:56 +0000 (15:36 -0500)
committerSven Eden <yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:36 +0000 (17:58 +0200)
Less typing and doesn't make the table so incredibly wide.

src/basic/cgroup-util.c
src/basic/cgroup-util.h
src/core/mount-setup.c

index 057d847..ad41223 100644 (file)
@@ -2498,7 +2498,7 @@ bool cg_is_legacy_wanted(void) {
         return !cg_is_unified_wanted();
 }
 
-bool cg_is_unified_systemd_controller_wanted(void) {
+bool cg_is_hybrid_wanted(void) {
         static thread_local int wanted = -1;
         int r;
         bool b;
index 5fbea23..33b7ba7 100644 (file)
@@ -255,6 +255,7 @@ bool cg_ns_supported(void);
 
 #if 0 /// UNNEEDED by elogind
 bool cg_all_unified(void);
+bool cg_hybrid_unified(void);
 bool cg_unified(const char *controller);
 int cg_unified_flush(void);
 
@@ -262,7 +263,7 @@ bool cg_is_unified_wanted(void);
 #endif // 0
 bool cg_is_legacy_wanted(void);
 #if 0 /// UNNEEDED by elogind
-bool cg_is_unified_systemd_controller_wanted(void);
+bool cg_is_hybrid_wanted(void);
 #endif // 0
 
 const char* cgroup_controller_to_string(CGroupController c) _const_;
index f38f1ee..694a03c 100644 (file)
@@ -105,19 +105,19 @@ static const MountPoint mount_table[] = {
         { "tmpfs",       "/sys/fs/cgroup",            "tmpfs",      "mode=755",                MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME,
           cg_is_legacy_wanted, MNT_FATAL|MNT_IN_CONTAINER },
 #if 0 /// UNNEEDED by elogind
-        { "cgroup",      "/sys/fs/cgroup/systemd",    "cgroup2",    NULL,                      MS_NOSUID|MS_NOEXEC|MS_NODEV,
-          cg_is_unified_systemd_controller_wanted, MNT_IN_CONTAINER },
+        { "cgroup",      "/sys/fs/cgroup/unified",    "cgroup2",    NULL,                      MS_NOSUID|MS_NOEXEC|MS_NODEV,
+          cg_is_hybrid_wanted, MNT_IN_CONTAINER },
         { "cgroup",      "/sys/fs/cgroup/systemd",    "cgroup",     "none,name=systemd,xattr", MS_NOSUID|MS_NOEXEC|MS_NODEV,
-          cg_is_legacy_systemd_controller_wanted, MNT_IN_CONTAINER  },
+          cg_is_legacy_wanted, MNT_IN_CONTAINER     },
         { "cgroup",      "/sys/fs/cgroup/systemd",    "cgroup",     "none,name=systemd",       MS_NOSUID|MS_NOEXEC|MS_NODEV,
-          cg_is_legacy_systemd_controller_wanted, MNT_IN_CONTAINER  },
 #else
         { "cgroup",      "/sys/fs/cgroup/elogind",    "cgroup",     "none,name=elogind,xattr", MS_NOSUID|MS_NOEXEC|MS_NODEV,
-          cg_is_legacy_systemd_controller_wanted, MNT_IN_CONTAINER  },
+          cg_is_legacy_wanted, MNT_IN_CONTAINER  },
         { "cgroup",      "/sys/fs/cgroup/elogind",    "cgroup",     "none,name=elogind",       MS_NOSUID|MS_NOEXEC|MS_NODEV,
-          cg_is_legacy_systemd_controller_wanted, MNT_IN_CONTAINER  },
+          cg_is_legacy_wanted, MNT_IN_CONTAINER  },
 #endif // 0
 #if 0 /// UNNEEDED by elogind
+          cg_is_legacy_wanted, MNT_FATAL|MNT_IN_CONTAINER },
         { "pstore",      "/sys/fs/pstore",            "pstore",     NULL,                      MS_NOSUID|MS_NOEXEC|MS_NODEV,
           NULL,          MNT_NONE                   },
 #ifdef ENABLE_EFI