mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 04:56:31 +00:00
cgfsng: cg_is_pure_unified()
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
96e6f37f51
commit
c71d83e17e
@ -1344,19 +1344,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. */
|
||||
|
Loading…
Reference in New Issue
Block a user