From 0a06a1812d7471d77b8c3c32f652f894f83067a9 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Tue, 10 Mar 2015 20:15:45 -0400 Subject: [PATCH] Convert virDomainVcpuPinDefFree to virDomainPinDefFree Since both Vcpu and IOThreads code use the same API's, alter the naming of the API's to remove the "Vcpu" specific reference --- src/conf/domain_conf.c | 20 ++++++++++---------- src/conf/domain_conf.h | 2 +- src/libvirt_private.syms | 2 +- src/qemu/qemu_driver.c | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 4b8e0e3c10..f495a0900b 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2037,7 +2037,7 @@ virDomainVcpuPinDefCopy(virDomainPinDefPtr *src, int nvcpupin) } void -virDomainVcpuPinDefFree(virDomainPinDefPtr def) +virDomainPinDefFree(virDomainPinDefPtr def) { if (def) { virBitmapFree(def->cpumask); @@ -2055,7 +2055,7 @@ virDomainVcpuPinDefArrayFree(virDomainPinDefPtr *def, return; for (i = 0; i < nvcpupin; i++) - virDomainVcpuPinDefFree(def[i]); + virDomainPinDefFree(def[i]); VIR_FREE(def); } @@ -2231,7 +2231,7 @@ void virDomainDefFree(virDomainDefPtr def) virDomainVcpuPinDefArrayFree(def->cputune.vcpupin, def->cputune.nvcpupin); - virDomainVcpuPinDefFree(def->cputune.emulatorpin); + virDomainPinDefFree(def->cputune.emulatorpin); virDomainVcpuPinDefArrayFree(def->cputune.iothreadspin, def->cputune.niothreadspin); @@ -13534,7 +13534,7 @@ virDomainDefParseXML(xmlDocPtr xml, vcpupin->id)) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("duplicate vcpupin for same vcpu")); - virDomainVcpuPinDefFree(vcpupin); + virDomainPinDefFree(vcpupin); goto error; } @@ -13545,7 +13545,7 @@ virDomainDefParseXML(xmlDocPtr xml, * ignoring them instead. */ VIR_WARN("Ignore vcpupin for not onlined vcpus"); - virDomainVcpuPinDefFree(vcpupin); + virDomainPinDefFree(vcpupin); } else { def->cputune.vcpupin[def->cputune.nvcpupin++] = vcpupin; } @@ -13626,7 +13626,7 @@ virDomainDefParseXML(xmlDocPtr xml, iothreadpin->id)) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("duplicate iothreadpin for same iothread")); - virDomainVcpuPinDefFree(iothreadpin); + virDomainPinDefFree(iothreadpin); goto error; } @@ -16812,7 +16812,7 @@ virDomainVcpuPinAdd(virDomainPinDefPtr **vcpupin_list, return 0; error: - virDomainVcpuPinDefFree(vcpupin); + virDomainPinDefFree(vcpupin); return -1; } @@ -16847,7 +16847,7 @@ virDomainEmulatorPinAdd(virDomainDefPtr def, emulatorpin->id = -1; emulatorpin->cpumask = virBitmapNewData(cpumap, maplen); if (!emulatorpin->cpumask) { - virDomainVcpuPinDefFree(emulatorpin); + virDomainPinDefFree(emulatorpin); return -1; } @@ -16871,7 +16871,7 @@ virDomainEmulatorPinDel(virDomainDefPtr def) if (!def->cputune.emulatorpin) return 0; - virDomainVcpuPinDefFree(def->cputune.emulatorpin); + virDomainPinDefFree(def->cputune.emulatorpin); def->cputune.emulatorpin = NULL; return 0; @@ -16918,7 +16918,7 @@ virDomainIOThreadsPinAdd(virDomainPinDefPtr **iothreadspin_list, return 0; error: - virDomainVcpuPinDefFree(iothreadpin); + virDomainPinDefFree(iothreadpin); return -1; } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 12ac2c0236..57c36c11b5 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1907,7 +1907,7 @@ struct _virDomainPinDef { virBitmapPtr cpumask; }; -void virDomainVcpuPinDefFree(virDomainPinDefPtr def); +void virDomainPinDefFree(virDomainPinDefPtr def); void virDomainVcpuPinDefArrayFree(virDomainPinDefPtr *def, int nvcpupin); virDomainPinDefPtr *virDomainVcpuPinDefCopy(virDomainPinDefPtr *src, diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index ea3ffb0a79..14cf3c7d87 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -384,6 +384,7 @@ virDomainObjTaint; virDomainParseMemory; virDomainPausedReasonTypeFromString; virDomainPausedReasonTypeToString; +virDomainPinDefFree; virDomainPMSuspendedReasonTypeFromString; virDomainPMSuspendedReasonTypeToString; virDomainRedirdevBusTypeFromString; @@ -438,7 +439,6 @@ virDomainTPMModelTypeToString; virDomainVcpuPinAdd; virDomainVcpuPinDefArrayFree; virDomainVcpuPinDefCopy; -virDomainVcpuPinDefFree; virDomainVcpuPinDel; virDomainVcpuPinFindByVcpu; virDomainVcpuPinIsDuplicate; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index e56258f16e..4b644f7df2 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5438,7 +5438,7 @@ qemuDomainPinEmulator(virDomainPtr dom, goto endjob; } } else { - virDomainVcpuPinDefFree(vm->def->cputune.emulatorpin); + virDomainPinDefFree(vm->def->cputune.emulatorpin); vm->def->cputune.emulatorpin = newVcpuPin[0]; VIR_FREE(newVcpuPin); }