vircgroup: virCgroupNew is now always called with absolute path

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Pavel Hrdina 2020-10-15 12:36:40 +02:00
parent 2eb83e270d
commit 95dc2fabe3

View File

@ -457,10 +457,8 @@ virCgroupDetect(virCgroupPtr group,
if (virCgroupDetectMounts(group) < 0) if (virCgroupDetectMounts(group) < 0)
return -1; return -1;
if (path[0] == '/') { if (virCgroupCopyPlacement(group, path, NULL) < 0)
if (virCgroupCopyPlacement(group, path, NULL) < 0) return -1;
return -1;
}
/* ... but use /proc/cgroups to fill in the rest */ /* ... but use /proc/cgroups to fill in the rest */
if (virCgroupDetectPlacement(group, pid, path) < 0) if (virCgroupDetectPlacement(group, pid, path) < 0)
@ -703,10 +701,6 @@ virCgroupMakeGroup(virCgroupPtr parent,
* *
* Create a new cgroup storing it in @group. * Create a new cgroup storing it in @group.
* *
* If @path starts with a '/' it is treated as an
* absolute path. Otherwise then the placement of the current
* process is used.
*
* Returns 0 on success, -1 on error * Returns 0 on success, -1 on error
*/ */
int int