]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: return ENOCGROUP2 from cgroup_attach()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 2 Feb 2021 21:22:53 +0000 (22:22 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 2 Feb 2021 21:56:10 +0000 (22:56 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 498c2d819189c22cbde838deb7a72c0a0b7cc4f9..c05e47906af2f6ba47289399bf78bfb320c01b76 100644 (file)
@@ -3470,7 +3470,7 @@ int cgroup_attach(const struct lxc_conf *conf, const char *name,
 
        unified_fd = lxc_cmd_get_cgroup2_fd(name, lxcpath);
        if (unified_fd < 0)
-               return ret_errno(EBADF);
+               return ret_errno(ENOCGROUP2);
 
        if (!lxc_list_empty(&conf->id_map)) {
                struct userns_exec_unified_attach_data args = {