Since it's only ever referenced in domain_conf.c, make the function
static, but also will need to move it to somewhere before it's referenced
rather than forward referencing it.
}
+/* Check if pin with same id already exists. */
+static bool
+virDomainPinIsDuplicate(virDomainPinDefPtr *def,
+ int npin,
+ int id)
+{
+ size_t i;
+
+ if (!def || !npin)
+ return false;
+
+ for (i = 0; i < npin; i++) {
+ if (def[i]->id == id)
+ return true;
+ }
+
+ return false;
+}
+
/* Parse the XML definition for a vcpupin
*
* vcpupin has the form of
}
}
-/* Check if vcpupin with same id already exists. */
-bool
-virDomainPinIsDuplicate(virDomainPinDefPtr *def,
- int npin,
- int id)
-{
- size_t i;
-
- if (!def || !npin)
- return false;
-
- for (i = 0; i < npin; i++) {
- if (def[i]->id == id)
- return true;
- }
-
- return false;
-}
-
virDomainPinDefPtr
virDomainPinFind(virDomainPinDefPtr *def,
int npin,
virDomainPinDefPtr *virDomainPinDefCopy(virDomainPinDefPtr *src,
int npin);
-bool virDomainPinIsDuplicate(virDomainPinDefPtr *def,
- int npin,
- int id);
-
virDomainPinDefPtr virDomainPinFind(virDomainPinDefPtr *def,
int npin,
int id);
virDomainPinDefFree;
virDomainPinDel;
virDomainPinFind;
-virDomainPinIsDuplicate;
virDomainPMSuspendedReasonTypeFromString;
virDomainPMSuspendedReasonTypeToString;
virDomainRedirdevBusTypeFromString;