From: Christian Brauner Date: Sat, 17 Feb 2018 18:20:54 +0000 (+0100) Subject: cgfsng: cg_is_pure_unified() X-Git-Tag: lxc-2.0.10~290 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d251d9272a97f26778e3bbfbcac4dfcc473b4ed5;p=thirdparty%2Flxc.git cgfsng: cg_is_pure_unified() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 9ecbf5ac7..a2f4bd369 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -1333,19 +1333,20 @@ static bool cg_hybrid_init(void) return true; } -static int cg_is_pure_unified(void) { +static int cg_is_pure_unified(void) +{ int ret; - struct statfs fs; + struct statfs fs; - ret = statfs("/sys/fs/cgroup", &fs); - if (ret < 0) - return -ENOMEDIUM; + ret = statfs("/sys/fs/cgroup", &fs); + if (ret < 0) + return -ENOMEDIUM; - if (is_fs_type(&fs, CGROUP2_SUPER_MAGIC)) + if (is_fs_type(&fs, CGROUP2_SUPER_MAGIC)) return CGROUP2_SUPER_MAGIC; - return 0; + return 0; } /* Get current cgroup from /proc/self/cgroup for the cgroupfs v2 hierarchy. */