[PATCH 1/2] cgroup: export virCgroupRemoveRecursively

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We will use virCgroupRemoveRecursively to remove cgroup
directories in the coming patch.

Signed-off-by: Gao feng <gaofeng@xxxxxxxxxxxxxx>
---
 src/libvirt_private.syms | 1 +
 src/util/vircgroup.c     | 4 ++--
 src/util/vircgroup.h     | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index dc01bfa..8cc50c4 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1118,6 +1118,7 @@ virCgroupKillRecursive;
 virCgroupMounted;
 virCgroupMoveTask;
 virCgroupPathOfController;
+virCgroupRemoveRecursively;
 virCgroupRemove;
 virCgroupSetBlkioDeviceWeight;
 virCgroupSetBlkioWeight;
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 532e704..6998f13 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -686,7 +686,7 @@ cleanup:
 #endif
 
 #if defined _DIRENT_HAVE_D_TYPE
-static int virCgroupRemoveRecursively(char *grppath)
+int virCgroupRemoveRecursively(char *grppath)
 {
     DIR *grpdir;
     struct dirent *ent;
@@ -735,7 +735,7 @@ static int virCgroupRemoveRecursively(char *grppath)
     return rc;
 }
 #else
-static int virCgroupRemoveRecursively(char *grppath ATTRIBUTE_UNUSED)
+int virCgroupRemoveRecursively(char *grppath ATTRIBUTE_UNUSED)
 {
     /* Claim no support */
     return -ENXIO;
diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
index 2ed6ff9..ea42fa2 100644
--- a/src/util/vircgroup.h
+++ b/src/util/vircgroup.h
@@ -157,6 +157,7 @@ int virCgroupGetCpusetMems(virCgroupPtr group, char **mems);
 int virCgroupSetCpusetCpus(virCgroupPtr group, const char *cpus);
 int virCgroupGetCpusetCpus(virCgroupPtr group, char **cpus);
 
+int virCgroupRemoveRecursively(char *grppath);
 int virCgroupRemove(virCgroupPtr group);
 
 void virCgroupFree(virCgroupPtr *group);
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]