From: Christian Brauner Date: Tue, 26 Jan 2021 14:58:41 +0000 (+0100) Subject: criu: handle cgroup2 freezer X-Git-Tag: lxc-5.0.0~317^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=928b065d34e2a8eecdfcd008d169a21bc1106a1d;p=thirdparty%2Flxc.git criu: handle cgroup2 freezer Signed-off-by: Christian Brauner --- diff --git a/src/lxc/criu.c b/src/lxc/criu.c index 31961d0f0..f3dd6531e 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -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;