]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix cgroups when all are mounted on /sys/fs/cgroup
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 10 Sep 2013 13:31:53 +0000 (14:31 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 11 Sep 2013 10:45:38 +0000 (11:45 +0100)
commitf0b6d8d472de3c1bf3ade24e07df7c6d02075b77
treef3538c0dffea0f170d9011ff8b73f1558b14b8e4
parentef5d51d491356f1f4287aa3a8b908b183b6dd9aa
Fix cgroups when all are mounted on /sys/fs/cgroup

Some users in Ubuntu/Debian seem to have a setup where all the
cgroup controllers are mounted on /sys/fs/cgroup rather than
any /sys/fs/cgroup/<controller> name. In the loop which detects
which controllers are present for a mount point we were modifying
'mnt_dir' field in the 'struct mntent' var, but not always restoring
the original value. This caused detection to break in the all-in-one
mount setup.

Fix that logic bug and add test case coverage for this mount
setup.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/util/vircgroup.c
tests/vircgroupmock.c
tests/vircgrouptest.c