[PATCH 06/17] vircgroup: Remove unused function virCgroupKill()

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/libvirt_private.syms |  1 -
 src/util/vircgroup.c     | 37 -------------------------------------
 src/util/vircgroup.h     |  1 -
 3 files changed, 39 deletions(-)

diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 32ed5a09f9..8f80ee2250 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1539,7 +1539,6 @@ virCgroupGetMemSwapUsage;
 virCgroupGetPercpuStats;
 virCgroupHasController;
 virCgroupHasEmptyTasks;
-virCgroupKill;
 virCgroupKillPainfully;
 virCgroupKillRecursive;
 virCgroupNewDetect;
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index fd58ba154f..d9f6c5b06f 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -3510,33 +3510,6 @@ virCgroupPidCopy(const void *name)
 }
 
 
-/*
- * Returns 1 if some PIDs are killed, 0 if none are killed, or -1 on error
- */
-int
-virCgroupKill(virCgroupPtr group, int signum)
-{
-    VIR_DEBUG("group=%p path=%s signum=%d", group, group->path, signum);
-    int ret;
-    /* The 'tasks' file in cgroups can contain duplicated
-     * pids, so we use a hash to track which we've already
-     * killed.
-     */
-    virHashTablePtr pids = virHashCreateFull(100,
-                                             NULL,
-                                             virCgroupPidCode,
-                                             virCgroupPidEqual,
-                                             virCgroupPidCopy,
-                                             NULL);
-
-    ret = virCgroupKillInternal(group, signum, pids);
-
-    virHashFree(pids);
-
-    return ret;
-}
-
-
 static int
 virCgroupKillRecursiveInternal(virCgroupPtr group,
                                int signum,
@@ -4585,16 +4558,6 @@ virCgroupRemove(virCgroupPtr group ATTRIBUTE_UNUSED)
 }
 
 
-int
-virCgroupKill(virCgroupPtr group ATTRIBUTE_UNUSED,
-              int signum ATTRIBUTE_UNUSED)
-{
-    virReportSystemError(ENOSYS, "%s",
-                         _("Control groups not supported on this platform"));
-    return -1;
-}
-
-
 int
 virCgroupKillRecursive(virCgroupPtr group ATTRIBUTE_UNUSED,
                        int signum ATTRIBUTE_UNUSED)
diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
index af93316197..a23a491d95 100644
--- a/src/util/vircgroup.h
+++ b/src/util/vircgroup.h
@@ -280,7 +280,6 @@ int virCgroupGetCpusetCpus(virCgroupPtr group, char **cpus);
 int virCgroupRemoveRecursively(char *grppath);
 int virCgroupRemove(virCgroupPtr group);
 
-int virCgroupKill(virCgroupPtr group, int signum);
 int virCgroupKillRecursive(virCgroupPtr group, int signum);
 int virCgroupKillPainfully(virCgroupPtr group);
 
-- 
2.17.1

--
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]

  Powered by Linux