]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
criu: handle cgroup2 freezer 3633/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 26 Jan 2021 14:58:41 +0000 (15:58 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 26 Jan 2021 14:58:41 +0000 (15:58 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/criu.c

index 31961d0f07ac92e69b415924c2c29c8bc21328b0..f3dd6531edb46b675d54e102713d6c1379e223aa 100644 (file)
@@ -404,7 +404,10 @@ static void exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
                        goto err;
                }
 
-               ret = snprintf(log, sizeof(log), "/sys/fs/cgroup/freezer/%s", freezer_relative);
+               if (pure_unified_layout(cgroup_ops))
+                       ret = snprintf(log, sizeof(log), "/sys/fs/cgroup/%s", freezer_relative);
+               else
+                       ret = snprintf(log, sizeof(log), "/sys/fs/cgroup/freezer/%s", freezer_relative);
                if (ret < 0 || ret >= sizeof(log))
                        goto err;