]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Replace virDomainVcpuPinDel with virDomainPinDel
authorJohn Ferlan <jferlan@redhat.com>
Wed, 11 Mar 2015 20:42:44 +0000 (16:42 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 16 Mar 2015 15:54:57 +0000 (11:54 -0400)
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
src/conf/domain_conf.h
src/libvirt_private.syms
src/libxl/libxl_driver.c
src/qemu/qemu_driver.c

index a4026ca7bdf08231f69c54c73697c5cd6fc522c6..90dbabd76d6f0b51f324c2bb1ad9641c2ca76a97 100644 (file)
@@ -16815,16 +16815,17 @@ virDomainPinAdd(virDomainPinDefPtr **pindef_list,
 }
 
 void
-virDomainVcpuPinDel(virDomainDefPtr def, int vcpu)
+virDomainPinDel(virDomainPinDefPtr **pindef_list,
+                size_t *npin,
+                int id)
 {
     int n;
-    virDomainPinDefPtr *vcpupin_list = def->cputune.vcpupin;
 
-    for (n = 0; n < def->cputune.nvcpupin; n++) {
-        if (vcpupin_list[n]->id == vcpu) {
-            virBitmapFree(vcpupin_list[n]->cpumask);
-            VIR_FREE(vcpupin_list[n]);
-            VIR_DELETE_ELEMENT(def->cputune.vcpupin, n, def->cputune.nvcpupin);
+    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;
         }
     }
index 49d83a226f8583345d21e132eb62d1f0edd08084..3b32c8d5b2415fb481eaa9da7e16f3975cbc751f 100644 (file)
@@ -2563,7 +2563,9 @@ int virDomainPinAdd(virDomainPinDefPtr **pindef_list,
                     int maplen,
                     int id);
 
-void virDomainVcpuPinDel(virDomainDefPtr def, int vcpu);
+void virDomainPinDel(virDomainPinDefPtr **pindef_list,
+                     size_t *npin,
+                     int vcpu);
 
 int virDomainEmulatorPinAdd(virDomainDefPtr def,
                               unsigned char *cpumap,
index 9fe766ad6b68585977b531c91bbacfe734f6e5d7..adbdece076b4156d9b78ad10c3afde3e0abf93a6 100644 (file)
@@ -387,6 +387,7 @@ virDomainPinAdd;
 virDomainPinDefArrayFree;
 virDomainPinDefCopy;
 virDomainPinDefFree;
+virDomainPinDel;
 virDomainPinFind;
 virDomainPinIsDuplicate;
 virDomainPMSuspendedReasonTypeFromString;
@@ -440,7 +441,6 @@ virDomainTPMBackendTypeToString;
 virDomainTPMDefFree;
 virDomainTPMModelTypeFromString;
 virDomainTPMModelTypeToString;
-virDomainVcpuPinDel;
 virDomainVideoDefaultRAM;
 virDomainVideoDefaultType;
 virDomainVideoDefFree;
index 45dd385f9be584d9884a02a7e410e3bd87350dc1..e555ca4f5afb79bc323f9b2789fca2ed66591cc6 100644 (file)
@@ -1990,7 +1990,9 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned int vcpu,
 
     /* full bitmap means reset the settings (if any). */
     if (virBitmapIsAllSet(pcpumap)) {
-        virDomainVcpuPinDel(targetDef, vcpu);
+        virDomainPinDel(&targetDef->cputune.vcpupin,
+                        &targetDef->cputune.nvcpupin,
+                        vcpu);
         goto done;
     }
 
index 5c8d75b3d142e197caa61fc467692aa0f0b5bd97..149963f0562d7d6e51fbc549e5011bc7e2dad882 100644 (file)
@@ -4801,7 +4801,9 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
             }
 
             /* Free vcpupin setting */
-            virDomainVcpuPinDel(vm->def, i);
+            virDomainPinDel(&vm->def->cputune.vcpupin,
+                            &vm->def->cputune.nvcpupin,
+                            i);
         }
     }
 
@@ -4983,7 +4985,9 @@ qemuDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
             /* remove vcpupin entries for vcpus that were unplugged */
             if (nvcpus < persistentDef->vcpus) {
                 for (i = persistentDef->vcpus; i >= nvcpus; i--)
-                    virDomainVcpuPinDel(persistentDef, i);
+                    virDomainPinDel(&persistentDef->cputune.vcpupin,
+                                    &persistentDef->cputune.nvcpupin,
+                                    i);
             }
 
             if (maximum) {
@@ -5151,7 +5155,9 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
         }
 
         if (doReset) {
-            virDomainVcpuPinDel(vm->def, vcpu);
+            virDomainPinDel(&vm->def->cputune.vcpupin,
+                            &vm->def->cputune.nvcpupin,
+                            vcpu);
         } else {
             if (vm->def->cputune.vcpupin)
                 virDomainPinDefArrayFree(vm->def->cputune.vcpupin,
@@ -5181,7 +5187,9 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
     if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
 
         if (doReset) {
-            virDomainVcpuPinDel(persistentDef, vcpu);
+            virDomainPinDel(&persistentDef->cputune.vcpupin,
+                            &persistentDef->cputune.nvcpupin,
+                            vcpu);
         } else {
             if (!persistentDef->cputune.vcpupin) {
                 if (VIR_ALLOC(persistentDef->cputune.vcpupin) < 0)