mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
conf: Move virDomainPinIsDuplicate and make static
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.
This commit is contained in:
parent
8d4614a512
commit
b96254d4a1
@ -13246,6 +13246,25 @@ virDomainIOThreadIDDefParseXML(xmlNodePtr node,
|
||||
}
|
||||
|
||||
|
||||
/* 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
|
||||
@ -17440,25 +17459,6 @@ virDomainIOThreadIDDel(virDomainDefPtr def,
|
||||
}
|
||||
}
|
||||
|
||||
/* 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,
|
||||
|
@ -1947,10 +1947,6 @@ void virDomainPinDefArrayFree(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);
|
||||
|
@ -414,7 +414,6 @@ virDomainPinDefCopy;
|
||||
virDomainPinDefFree;
|
||||
virDomainPinDel;
|
||||
virDomainPinFind;
|
||||
virDomainPinIsDuplicate;
|
||||
virDomainPMSuspendedReasonTypeFromString;
|
||||
virDomainPMSuspendedReasonTypeToString;
|
||||
virDomainRedirdevBusTypeFromString;
|
||||
|
Loading…
Reference in New Issue
Block a user