]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: remove is_crucial_cgroup_subsystem()
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 4 Jul 2018 08:45:14 +0000 (10:45 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 4 Jul 2018 08:45:14 +0000 (10:45 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgroup.c
src/lxc/cgroups/cgroup.h

index 754fdcae37f18407442b5c9acdb423ab712de084..afb2a9e88082fb2831861e6a1d2cf155d7c547cb 100644 (file)
@@ -108,33 +108,3 @@ void prune_init_scope(char *cg)
                        *point = '\0';
        }
 }
-
-/* Return true if this is a subsystem which we cannot do without.
- *
- * systemd is questionable here. The way callers currently use this, if systemd
- * is not mounted then it will be ignored. But if systemd is mounted, then it
- * must be setup so that lxc can create cgroups in it, else containers will
- * fail.
- *
- * cgroups listed in lxc.cgroup.use are also treated as crucial
- *
- */
-bool is_crucial_cgroup_subsystem(const char *s)
-{
-       const char *cgroup_use;
-
-       if (strcmp(s, "systemd") == 0)
-               return true;
-
-       if (strcmp(s, "name=systemd") == 0)
-               return true;
-
-       if (strcmp(s, "freezer") == 0)
-               return true;
-
-       cgroup_use = lxc_global_config_value("lxc.cgroup.use");
-       if (cgroup_use && strstr(cgroup_use, s))
-               return true;
-
-       return false;
-}
index ae910be8b14f625b2d5b50f2b0a8a1fc134580b5..eae4ca06e4525b905ebd119e64acedc2b209ac12 100644 (file)
@@ -149,6 +149,5 @@ extern struct cgroup_ops *cgroup_init(struct lxc_handler *handler);
 extern void cgroup_exit(struct cgroup_ops *ops);
 
 extern void prune_init_scope(char *cg);
-extern bool is_crucial_cgroup_subsystem(const char *s);
 
 #endif