mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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:
parent
2eb83e270d
commit
95dc2fabe3
@ -457,10 +457,8 @@ virCgroupDetect(virCgroupPtr group,
|
||||
if (virCgroupDetectMounts(group) < 0)
|
||||
return -1;
|
||||
|
||||
if (path[0] == '/') {
|
||||
if (virCgroupCopyPlacement(group, path, NULL) < 0)
|
||||
return -1;
|
||||
}
|
||||
if (virCgroupCopyPlacement(group, path, NULL) < 0)
|
||||
return -1;
|
||||
|
||||
/* ... but use /proc/cgroups to fill in the rest */
|
||||
if (virCgroupDetectPlacement(group, pid, path) < 0)
|
||||
@ -703,10 +701,6 @@ virCgroupMakeGroup(virCgroupPtr parent,
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
int
|
||||
|
Loading…
x
Reference in New Issue
Block a user