]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Convert virDomainVcpuPinIsDuplicate into virDomainPinIsDuplicate
authorJohn Ferlan <jferlan@redhat.com>
Wed, 11 Mar 2015 00:27:39 +0000 (20:27 -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

index c01b8952a057d6896a20a72279ced6e865a08e60..d3dfefa449338c3cc5284735929e5cc6bb6b88cb 100644 (file)
@@ -13529,9 +13529,9 @@ virDomainDefParseXML(xmlDocPtr xml,
         if (!vcpupin)
             goto error;
 
-        if (virDomainVcpuPinIsDuplicate(def->cputune.vcpupin,
-                                        def->cputune.nvcpupin,
-                                        vcpupin->id)) {
+        if (virDomainPinIsDuplicate(def->cputune.vcpupin,
+                                    def->cputune.nvcpupin,
+                                    vcpupin->id)) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            "%s", _("duplicate vcpupin for same vcpu"));
             virDomainPinDefFree(vcpupin);
@@ -13560,9 +13560,9 @@ virDomainDefParseXML(xmlDocPtr xml,
             goto error;
 
         for (i = 0; i < def->vcpus; i++) {
-            if (virDomainVcpuPinIsDuplicate(def->cputune.vcpupin,
-                                            def->cputune.nvcpupin,
-                                            i))
+            if (virDomainPinIsDuplicate(def->cputune.vcpupin,
+                                        def->cputune.nvcpupin,
+                                        i))
                 continue;
 
             virDomainPinDefPtr vcpupin = NULL;
@@ -13621,9 +13621,9 @@ virDomainDefParseXML(xmlDocPtr xml,
         if (!iothreadpin)
             goto error;
 
-        if (virDomainVcpuPinIsDuplicate(def->cputune.iothreadspin,
-                                        def->cputune.niothreadspin,
-                                        iothreadpin->id)) {
+        if (virDomainPinIsDuplicate(def->cputune.iothreadspin,
+                                    def->cputune.niothreadspin,
+                                    iothreadpin->id)) {
             virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                            _("duplicate iothreadpin for same iothread"));
             virDomainPinDefFree(iothreadpin);
@@ -16736,17 +16736,17 @@ virDomainDefAddImplicitControllers(virDomainDefPtr def)
 /* Check if vcpupin with same id already exists.
  * Return 1 if exists, 0 if not. */
 int
-virDomainVcpuPinIsDuplicate(virDomainPinDefPtr *def,
-                            int nvcpupin,
-                            int vcpu)
+virDomainPinIsDuplicate(virDomainPinDefPtr *def,
+                        int npin,
+                        int id)
 {
     size_t i;
 
-    if (!def || !nvcpupin)
+    if (!def || !npin)
         return 0;
 
-    for (i = 0; i < nvcpupin; i++) {
-        if (def[i]->id == vcpu)
+    for (i = 0; i < npin; i++) {
+        if (def[i]->id == id)
             return 1;
     }
 
index f991927f95fc44c460f817eca8e194680e8dd971..800d69730fe0d5f7802771e21d33e7812a1fafd9 100644 (file)
@@ -1913,9 +1913,9 @@ void virDomainPinDefArrayFree(virDomainPinDefPtr *def, int npin);
 virDomainPinDefPtr *virDomainPinDefCopy(virDomainPinDefPtr *src,
                                         int npin);
 
-int virDomainVcpuPinIsDuplicate(virDomainPinDefPtr *def,
-                                int nvcpupin,
-                                int vcpu);
+int virDomainPinIsDuplicate(virDomainPinDefPtr *def,
+                            int npin,
+                            int id);
 
 virDomainPinDefPtr virDomainVcpuPinFindByVcpu(virDomainPinDefPtr *def,
                                               int nvcpupin,
index ed1862903828737583ab4526e4ca6f80b6db4248..0481bfd85dfe3d2a1d1f6ff4a740bee60ae56133 100644 (file)
@@ -387,6 +387,7 @@ virDomainPausedReasonTypeToString;
 virDomainPinDefArrayFree;
 virDomainPinDefCopy;
 virDomainPinDefFree;
+virDomainPinIsDuplicate;
 virDomainPMSuspendedReasonTypeFromString;
 virDomainPMSuspendedReasonTypeToString;
 virDomainRedirdevBusTypeFromString;
@@ -441,7 +442,6 @@ virDomainTPMModelTypeToString;
 virDomainVcpuPinAdd;
 virDomainVcpuPinDel;
 virDomainVcpuPinFindByVcpu;
-virDomainVcpuPinIsDuplicate;
 virDomainVideoDefaultRAM;
 virDomainVideoDefaultType;
 virDomainVideoDefFree;