mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
Rename virCgroupGetAppRoot to virCgroupForSelf
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>
This commit is contained in:
parent
b1d3154a50
commit
804a809a06
@ -1096,9 +1096,9 @@ virCgroupDenyDevicePath;
|
||||
virCgroupForDomain;
|
||||
virCgroupForDriver;
|
||||
virCgroupForEmulator;
|
||||
virCgroupForSelf;
|
||||
virCgroupForVcpu;
|
||||
virCgroupFree;
|
||||
virCgroupGetAppRoot;
|
||||
virCgroupGetBlkioWeight;
|
||||
virCgroupGetCpuacctPercpuUsage;
|
||||
virCgroupGetCpuacctStat;
|
||||
|
@ -293,7 +293,7 @@ int virLXCCgroupGetMeminfo(virLXCMeminfoPtr meminfo)
|
||||
int ret;
|
||||
virCgroupPtr cgroup;
|
||||
|
||||
ret = virCgroupGetAppRoot(&cgroup);
|
||||
ret = virCgroupForSelf(&cgroup);
|
||||
if (ret < 0) {
|
||||
virReportSystemError(-ret, "%s",
|
||||
_("Unable to get cgroup for container"));
|
||||
|
@ -967,19 +967,22 @@ int virCgroupForDriver(const char *name ATTRIBUTE_UNUSED,
|
||||
#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;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ int virCgroupForDriver(const char *name,
|
||||
bool privileged,
|
||||
bool create);
|
||||
|
||||
int virCgroupGetAppRoot(virCgroupPtr *group);
|
||||
int virCgroupForSelf(virCgroupPtr *group);
|
||||
|
||||
int virCgroupForDomain(virCgroupPtr driver,
|
||||
const char *name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user