提交 b96254d4 编写于 作者: J John Ferlan

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.
上级 8d4614a5
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册