]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Rename virCgroupGetAppRoot to virCgroupForSelf
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 21 Mar 2013 11:53:14 +0000 (11:53 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 5 Apr 2013 09:41:54 +0000 (10:41 +0100)
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>
src/libvirt_private.syms
src/lxc/lxc_cgroup.c
src/util/vircgroup.c
src/util/vircgroup.h

index 7fc15d3505494a5066f7f971a37d645d2d825786..b7b963112f7662dc8bf0a7bbcadc9107311612a6 100644 (file)
@@ -1096,9 +1096,9 @@ virCgroupDenyDevicePath;
 virCgroupForDomain;
 virCgroupForDriver;
 virCgroupForEmulator;
+virCgroupForSelf;
 virCgroupForVcpu;
 virCgroupFree;
-virCgroupGetAppRoot;
 virCgroupGetBlkioWeight;
 virCgroupGetCpuacctPercpuUsage;
 virCgroupGetCpuacctStat;
index df468dadfa5b5315134162c33cfa3dae8da0eafc..33c305a2891a58a057da4117aab81b523c22f821 100644 (file)
@@ -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"));
index 6998f13aa4f56914254afe13649d41f754183c49..266cecb811f03d33666a8f04390c91d5d350b004 100644 (file)
@@ -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;
 }
index ea42fa22169e80f2b1bbfb60c8fea14c22f20dcd..45a2006b9d2fc0bc7e235a9e46e8b09e29a13fe1 100644 (file)
@@ -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,