]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nspawn: use namespace_type_supported()
authorMike Yuan <me@yhndnzj.com>
Fri, 18 Apr 2025 19:56:26 +0000 (21:56 +0200)
committerMike Yuan <me@yhndnzj.com>
Mon, 21 Apr 2025 14:54:37 +0000 (16:54 +0200)
src/nspawn/nspawn.c

index 2dcab7d3798e22c670a29be392f5a2ffb71240bb..6d4aaf872a301dc4528a55cba441c972f8737e91 100644 (file)
@@ -588,7 +588,7 @@ static int parse_environment(void) {
 
         /* SYSTEMD_NSPAWN_USE_CGNS=0 can be used to disable CLONE_NEWCGROUP use,
          * even if it is supported. If not supported, it has no effect. */
-        if (!cg_ns_supported())
+        if (!namespace_type_supported(NAMESPACE_CGROUP))
                 arg_use_cgns = false;
         else {
                 r = getenv_bool("SYSTEMD_NSPAWN_USE_CGNS");