|
|
c480ed |
From a4ed662c80b9241f4bc599fded59ace585db25c9 Mon Sep 17 00:00:00 2001
|
|
|
c480ed |
Message-Id: <a4ed662c80b9241f4bc599fded59ace585db25c9@dist-git>
|
|
|
c480ed |
From: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
Date: Mon, 1 Jul 2019 17:05:51 +0200
|
|
|
c480ed |
Subject: [PATCH] vircgroup: Remove unused function virCgroupKill()
|
|
|
c480ed |
MIME-Version: 1.0
|
|
|
c480ed |
Content-Type: text/plain; charset=UTF-8
|
|
|
c480ed |
Content-Transfer-Encoding: 8bit
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
(cherry picked from commit c8b1ae607d638b958dc51ba2041bd87ea72683de)
|
|
|
c480ed |
|
|
|
c480ed |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297
|
|
|
c480ed |
|
|
|
c480ed |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
c480ed |
Message-Id: <9f04fae641e673c68253864c858e2123c2252296.1561993099.git.phrdina@redhat.com>
|
|
|
c480ed |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
c480ed |
---
|
|
|
c480ed |
src/libvirt_private.syms | 1 -
|
|
|
c480ed |
src/util/vircgroup.c | 37 -------------------------------------
|
|
|
c480ed |
src/util/vircgroup.h | 1 -
|
|
|
c480ed |
3 files changed, 39 deletions(-)
|
|
|
c480ed |
|
|
|
c480ed |
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
|
|
|
c480ed |
index f158a17b49..3117c8009a 100644
|
|
|
c480ed |
--- a/src/libvirt_private.syms
|
|
|
c480ed |
+++ b/src/libvirt_private.syms
|
|
|
c480ed |
@@ -1558,7 +1558,6 @@ virCgroupGetMemSwapUsage;
|
|
|
c480ed |
virCgroupGetPercpuStats;
|
|
|
c480ed |
virCgroupHasController;
|
|
|
c480ed |
virCgroupHasEmptyTasks;
|
|
|
c480ed |
-virCgroupKill;
|
|
|
c480ed |
virCgroupKillPainfully;
|
|
|
c480ed |
virCgroupKillRecursive;
|
|
|
c480ed |
virCgroupNewDetect;
|
|
|
c480ed |
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
|
|
|
c480ed |
index 8ddedbfe7c..5f949edec8 100644
|
|
|
c480ed |
--- a/src/util/vircgroup.c
|
|
|
c480ed |
+++ b/src/util/vircgroup.c
|
|
|
c480ed |
@@ -3510,33 +3510,6 @@ virCgroupPidCopy(const void *name)
|
|
|
c480ed |
}
|
|
|
c480ed |
|
|
|
c480ed |
|
|
|
c480ed |
-/*
|
|
|
c480ed |
- * Returns 1 if some PIDs are killed, 0 if none are killed, or -1 on error
|
|
|
c480ed |
- */
|
|
|
c480ed |
-int
|
|
|
c480ed |
-virCgroupKill(virCgroupPtr group, int signum)
|
|
|
c480ed |
-{
|
|
|
c480ed |
- VIR_DEBUG("group=%p path=%s signum=%d", group, group->path, signum);
|
|
|
c480ed |
- int ret;
|
|
|
c480ed |
- /* The 'tasks' file in cgroups can contain duplicated
|
|
|
c480ed |
- * pids, so we use a hash to track which we've already
|
|
|
c480ed |
- * killed.
|
|
|
c480ed |
- */
|
|
|
c480ed |
- virHashTablePtr pids = virHashCreateFull(100,
|
|
|
c480ed |
- NULL,
|
|
|
c480ed |
- virCgroupPidCode,
|
|
|
c480ed |
- virCgroupPidEqual,
|
|
|
c480ed |
- virCgroupPidCopy,
|
|
|
c480ed |
- NULL);
|
|
|
c480ed |
-
|
|
|
c480ed |
- ret = virCgroupKillInternal(group, signum, pids);
|
|
|
c480ed |
-
|
|
|
c480ed |
- virHashFree(pids);
|
|
|
c480ed |
-
|
|
|
c480ed |
- return ret;
|
|
|
c480ed |
-}
|
|
|
c480ed |
-
|
|
|
c480ed |
-
|
|
|
c480ed |
static int
|
|
|
c480ed |
virCgroupKillRecursiveInternal(virCgroupPtr group,
|
|
|
c480ed |
int signum,
|
|
|
c480ed |
@@ -4585,16 +4558,6 @@ virCgroupRemove(virCgroupPtr group ATTRIBUTE_UNUSED)
|
|
|
c480ed |
}
|
|
|
c480ed |
|
|
|
c480ed |
|
|
|
c480ed |
-int
|
|
|
c480ed |
-virCgroupKill(virCgroupPtr group ATTRIBUTE_UNUSED,
|
|
|
c480ed |
- int signum ATTRIBUTE_UNUSED)
|
|
|
c480ed |
-{
|
|
|
c480ed |
- virReportSystemError(ENOSYS, "%s",
|
|
|
c480ed |
- _("Control groups not supported on this platform"));
|
|
|
c480ed |
- return -1;
|
|
|
c480ed |
-}
|
|
|
c480ed |
-
|
|
|
c480ed |
-
|
|
|
c480ed |
int
|
|
|
c480ed |
virCgroupKillRecursive(virCgroupPtr group ATTRIBUTE_UNUSED,
|
|
|
c480ed |
int signum ATTRIBUTE_UNUSED)
|
|
|
c480ed |
diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
|
|
|
c480ed |
index af93316197..a23a491d95 100644
|
|
|
c480ed |
--- a/src/util/vircgroup.h
|
|
|
c480ed |
+++ b/src/util/vircgroup.h
|
|
|
c480ed |
@@ -280,7 +280,6 @@ int virCgroupGetCpusetCpus(virCgroupPtr group, char **cpus);
|
|
|
c480ed |
int virCgroupRemoveRecursively(char *grppath);
|
|
|
c480ed |
int virCgroupRemove(virCgroupPtr group);
|
|
|
c480ed |
|
|
|
c480ed |
-int virCgroupKill(virCgroupPtr group, int signum);
|
|
|
c480ed |
int virCgroupKillRecursive(virCgroupPtr group, int signum);
|
|
|
c480ed |
int virCgroupKillPainfully(virCgroupPtr group);
|
|
|
c480ed |
|
|
|
c480ed |
--
|
|
|
c480ed |
2.22.0
|
|
|
c480ed |
|