Now that the pinning info is stored elsewhere we can delete all the
obsolete code.
---
src/conf/domain_conf.c | 136 -----------------------------------------------
src/conf/domain_conf.h | 27 ----------
src/libvirt_private.syms | 6 ---
3 files changed, 169 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6319856..1ace5a0 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2273,39 +2273,6 @@ virDomainClockDefClear(virDomainClockDefPtr def)
VIR_FREE(def->timers);
}
-virDomainPinDefPtr *
-virDomainPinDefCopy(virDomainPinDefPtr *src, int npin)
-{
- size_t i;
- virDomainPinDefPtr *ret = NULL;
-
- if (VIR_ALLOC_N(ret, npin) < 0)
- goto error;
-
- for (i = 0; i < npin; i++) {
- if (VIR_ALLOC(ret[i]) < 0)
- goto error;
- ret[i]->id = src[i]->id;
- if ((ret[i]->cpumask = virBitmapNewCopy(src[i]->cpumask)) == NULL)
- goto error;
- }
-
- return ret;
-
- error:
- if (ret) {
- for (i = 0; i < npin; i++) {
- if (ret[i]) {
- virBitmapFree(ret[i]->cpumask);
- VIR_FREE(ret[i]);
- }
- }
- VIR_FREE(ret);
- }
-
- return NULL;
-}
-
static bool
virDomainIOThreadIDArrayHasPin(virDomainDefPtr def)
@@ -2400,31 +2367,6 @@ virDomainIOThreadIDDefArrayInit(virDomainDefPtr def)
void
-virDomainPinDefFree(virDomainPinDefPtr def)
-{
- if (def) {
- virBitmapFree(def->cpumask);
- VIR_FREE(def);
- }
-}
-
-void
-virDomainPinDefArrayFree(virDomainPinDefPtr *def,
- int npin)
-{
- size_t i;
-
- if (!def)
- return;
-
- for (i = 0; i < npin; i++)
- virDomainPinDefFree(def[i]);
-
- VIR_FREE(def);
-}
-
-
-void
virDomainResourceDefFree(virDomainResourceDefPtr resource)
{
if (!resource)
@@ -18448,84 +18390,6 @@ virDomainIOThreadSchedDelId(virDomainDefPtr def,
}
}
-virDomainPinDefPtr
-virDomainPinFind(virDomainPinDefPtr *def,
- int npin,
- int id)
-{
- size_t i;
-
- if (!def || !npin)
- return NULL;
-
- for (i = 0; i < npin; i++) {
- if (def[i]->id == id)
- return def[i];
- }
-
- return NULL;
-}
-
-int
-virDomainPinAdd(virDomainPinDefPtr **pindef_list,
- size_t *npin,
- unsigned char *cpumap,
- int maplen,
- int id)
-{
- virDomainPinDefPtr pindef = NULL;
-
- if (!pindef_list)
- return -1;
-
- pindef = virDomainPinFind(*pindef_list, *npin, id);
- if (pindef) {
- pindef->id = id;
- virBitmapFree(pindef->cpumask);
- pindef->cpumask = virBitmapNewData(cpumap, maplen);
- if (!pindef->cpumask)
- return -1;
-
- return 0;
- }
-
- /* No existing pindef matches id, adding a new one */
-
- if (VIR_ALLOC(pindef) < 0)
- goto error;
-
- pindef->id = id;
- pindef->cpumask = virBitmapNewData(cpumap, maplen);
- if (!pindef->cpumask)
- goto error;
-
- if (VIR_APPEND_ELEMENT(*pindef_list, *npin, pindef) < 0)
- goto error;
-
- return 0;
-
- error:
- virDomainPinDefFree(pindef);
- return -1;
-}
-
-void
-virDomainPinDel(virDomainPinDefPtr **pindef_list,
- size_t *npin,
- int id)
-{
- int n;
-
- for (n = 0; n < *npin; n++) {
- if ((*pindef_list)[n]->id == id) {
- virBitmapFree((*pindef_list)[n]->cpumask);
- VIR_FREE((*pindef_list)[n]);
- VIR_DELETE_ELEMENT(*pindef_list, n, *npin);
- return;
- }
- }
-}
-
static int
virDomainEventActionDefFormat(virBufferPtr buf,
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index f735282..12fefd4 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2100,33 +2100,6 @@ struct _virDomainIOThreadIDDef {
void virDomainIOThreadIDDefFree(virDomainIOThreadIDDefPtr def);
-typedef struct _virDomainPinDef virDomainPinDef;
-typedef virDomainPinDef *virDomainPinDefPtr;
-struct _virDomainPinDef {
- int id;
- virBitmapPtr cpumask;
-};
-
-void virDomainPinDefFree(virDomainPinDefPtr def);
-void virDomainPinDefArrayFree(virDomainPinDefPtr *def, int npin);
-
-virDomainPinDefPtr *virDomainPinDefCopy(virDomainPinDefPtr *src,
- int npin);
-
-virDomainPinDefPtr virDomainPinFind(virDomainPinDefPtr *def,
- int npin,
- int id);
-
-int virDomainPinAdd(virDomainPinDefPtr **pindef_list,
- size_t *npin,
- unsigned char *cpumap,
- int maplen,
- int id);
-
-void virDomainPinDel(virDomainPinDefPtr **pindef_list,
- size_t *npin,
- int vcpu);
-
typedef struct _virDomainCputune virDomainCputune;
typedef virDomainCputune *virDomainCputunePtr;
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 276aacf..12cc887 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -420,12 +420,6 @@ virDomainOSTypeToString;
virDomainParseMemory;
virDomainPausedReasonTypeFromString;
virDomainPausedReasonTypeToString;
-virDomainPinAdd;
-virDomainPinDefArrayFree;
-virDomainPinDefCopy;
-virDomainPinDefFree;
-virDomainPinDel;
-virDomainPinFind;
virDomainPMSuspendedReasonTypeFromString;
virDomainPMSuspendedReasonTypeToString;
virDomainRedirdevBusTypeFromString;
--
2.6.2