From: Pavel Hrdina Date: Thu, 15 Oct 2020 10:36:40 +0000 (+0200) Subject: vircgroup: virCgroupNew is now always called with absolute path X-Git-Tag: v6.10.0-rc1~362 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95dc2fabe30f3e4e92d58c3ac45856fc76071081;p=thirdparty%2Flibvirt.git vircgroup: virCgroupNew is now always called with absolute path Signed-off-by: Pavel Hrdina Reviewed-by: Michal Privoznik --- diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 56aa9cc064..794680d696 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -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