The virCgroupGetAppRoot is not clear in its meaning. Change
to virCgroupForSelf to highlight that this returns the
cgroup config for the caller's process
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
virCgroupForDomain;
virCgroupForDriver;
virCgroupForEmulator;
+virCgroupForSelf;
virCgroupForVcpu;
virCgroupFree;
-virCgroupGetAppRoot;
virCgroupGetBlkioWeight;
virCgroupGetCpuacctPercpuUsage;
virCgroupGetCpuacctStat;
int ret;
virCgroupPtr cgroup;
- ret = virCgroupGetAppRoot(&cgroup);
+ ret = virCgroupForSelf(&cgroup);
if (ret < 0) {
virReportSystemError(-ret, "%s",
_("Unable to get cgroup for container"));
#endif
/**
-* virCgroupGetAppRoot:
+* virCgroupForSelf:
*
* @group: Pointer to returned virCgroupPtr
*
+* Obtain a cgroup representing the config of the
+* current process
+*
* Returns 0 on success
*/
#if defined HAVE_MNTENT_H && defined HAVE_GETMNTENT_R
-int virCgroupGetAppRoot(virCgroupPtr *group)
+int virCgroupForSelf(virCgroupPtr *group)
{
return virCgroupNew("/", group);
}
#else
-int virCgroupGetAppRoot(virCgroupPtr *group ATTRIBUTE_UNUSED)
+int virCgroupForSelf(virCgroupPtr *group ATTRIBUTE_UNUSED)
{
return -ENXIO;
}
bool privileged,
bool create);
-int virCgroupGetAppRoot(virCgroupPtr *group);
+int virCgroupForSelf(virCgroupPtr *group);
int virCgroupForDomain(virCgroupPtr driver,
const char *name,