]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
vircgroup: virCgroupNew is now always called with absolute path
authorPavel Hrdina <phrdina@redhat.com>
Thu, 15 Oct 2020 10:36:40 +0000 (12:36 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 3 Nov 2020 20:26:32 +0000 (21:26 +0100)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/vircgroup.c

index 56aa9cc064f71ec7b57e15bfcb3362d8b1aa6c00..794680d6963d7cab3205ac0196082b4215517dc5 100644 (file)
@@ -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