mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
conf: make virDomainControllerFindUnusedIndex() more generally usable
Make virDomainControllerFindUnusedIndex() a global function so that it can be used outside domain_conf.c (as well as higher up in domain_conf.c itself)/ Also make its DomainDef arg a const* so that functions which only have a const* to the domain can use it.
This commit is contained in:
parent
1140b31f25
commit
808e16ff13
@ -13717,8 +13717,8 @@ virDomainControllerFind(const virDomainDef *def,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virDomainControllerFindUnusedIndex(virDomainDefPtr def, int type)
|
||||
int
|
||||
virDomainControllerFindUnusedIndex(virDomainDef const *def, int type)
|
||||
{
|
||||
int idx = 0;
|
||||
|
||||
|
@ -2755,6 +2755,7 @@ int virDomainControllerFind(const virDomainDef *def, int type, int idx);
|
||||
int virDomainControllerFindByType(virDomainDefPtr def, int type);
|
||||
int virDomainControllerFindByPCIAddress(virDomainDefPtr def,
|
||||
virPCIDeviceAddressPtr addr);
|
||||
int virDomainControllerFindUnusedIndex(virDomainDef const *def, int type);
|
||||
virDomainControllerDefPtr virDomainControllerRemove(virDomainDefPtr def, size_t i);
|
||||
const char *virDomainControllerAliasFind(const virDomainDef *def,
|
||||
int type, int idx)
|
||||
|
@ -189,6 +189,7 @@ virDomainControllerDefFree;
|
||||
virDomainControllerDefNew;
|
||||
virDomainControllerFind;
|
||||
virDomainControllerFindByType;
|
||||
virDomainControllerFindUnusedIndex;
|
||||
virDomainControllerInsert;
|
||||
virDomainControllerInsertPreAlloced;
|
||||
virDomainControllerModelPCITypeToString;
|
||||
|
Loading…
Reference in New Issue
Block a user