mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 19:41:16 +00:00
conf: Rename virDomainPCIAddressAsString()
The struct is called virPCIDeviceAddress and the functions operating on it should be named accordingly. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
b72183223f
commit
a14f597266
@ -604,7 +604,7 @@ virDomainPCIAddressReserveAddrInternal(virDomainPCIAddressSetPtr addrs,
|
||||
virErrorNumber errType = (fromConfig
|
||||
? VIR_ERR_XML_ERROR : VIR_ERR_INTERNAL_ERROR);
|
||||
|
||||
if (!(addrStr = virDomainPCIAddressAsString(addr)))
|
||||
if (!(addrStr = virPCIDeviceAddressAsString(addr)))
|
||||
goto cleanup;
|
||||
|
||||
/* Add an extra bus if necessary */
|
||||
@ -689,7 +689,7 @@ virDomainPCIAddressEnsureAddr(virDomainPCIAddressSetPtr addrs,
|
||||
if (!flags)
|
||||
return 0;
|
||||
|
||||
if (!(addrStr = virDomainPCIAddressAsString(&dev->addr.pci)))
|
||||
if (!(addrStr = virPCIDeviceAddressAsString(&dev->addr.pci)))
|
||||
goto cleanup;
|
||||
|
||||
if (virDeviceInfoPCIAddressIsPresent(dev)) {
|
||||
@ -770,7 +770,7 @@ virDomainPCIAddressFindUnusedFunctionOnBus(virDomainPCIAddressBusPtr bus,
|
||||
|
||||
*found = false;
|
||||
|
||||
if (!(addrStr = virDomainPCIAddressAsString(searchAddr)))
|
||||
if (!(addrStr = virPCIDeviceAddressAsString(searchAddr)))
|
||||
goto cleanup;
|
||||
|
||||
if (!virDomainPCIAddressFlagsCompatible(searchAddr, addrStr, bus->flags,
|
||||
|
@ -2496,7 +2496,7 @@ virObjectUnref;
|
||||
|
||||
|
||||
# util/virpci.h
|
||||
virDomainPCIAddressAsString;
|
||||
virPCIDeviceAddressAsString;
|
||||
virPCIDeviceAddressGetIOMMUGroupAddresses;
|
||||
virPCIDeviceAddressGetIOMMUGroupNum;
|
||||
virPCIDeviceAddressGetSysfsFile;
|
||||
|
@ -301,7 +301,7 @@ qemuBuildDeviceAddressStr(virBufferPtr buf,
|
||||
if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
|
||||
size_t i;
|
||||
|
||||
if (!(devStr = virDomainPCIAddressAsString(&info->addr.pci)))
|
||||
if (!(devStr = virPCIDeviceAddressAsString(&info->addr.pci)))
|
||||
goto cleanup;
|
||||
for (i = 0; i < domainDef->ncontrollers; i++) {
|
||||
virDomainControllerDefPtr cont = domainDef->controllers[i];
|
||||
|
@ -1306,7 +1306,7 @@ qemuDomainCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
||||
* inappropriate address types.
|
||||
*/
|
||||
if (!info->pciConnectFlags) {
|
||||
char *addrStr = virDomainPCIAddressAsString(&info->addr.pci);
|
||||
char *addrStr = virPCIDeviceAddressAsString(&info->addr.pci);
|
||||
|
||||
VIR_WARN("qemuDomainDeviceCalculatePCIConnectFlags() thinks that the "
|
||||
"device with PCI address %s should not have a PCI address",
|
||||
@ -1554,7 +1554,7 @@ qemuDomainValidateDevicePCISlotsPIIX3(virDomainDefPtr def,
|
||||
memset(&tmp_addr, 0, sizeof(tmp_addr));
|
||||
tmp_addr.slot = 2;
|
||||
|
||||
if (!(addrStr = virDomainPCIAddressAsString(&tmp_addr)))
|
||||
if (!(addrStr = virPCIDeviceAddressAsString(&tmp_addr)))
|
||||
goto cleanup;
|
||||
if (!virDomainPCIAddressValidate(addrs, &tmp_addr,
|
||||
addrStr, flags, true))
|
||||
@ -1743,7 +1743,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
|
||||
memset(&tmp_addr, 0, sizeof(tmp_addr));
|
||||
tmp_addr.slot = 1;
|
||||
|
||||
if (!(addrStr = virDomainPCIAddressAsString(&tmp_addr)))
|
||||
if (!(addrStr = virPCIDeviceAddressAsString(&tmp_addr)))
|
||||
goto cleanup;
|
||||
if (!virDomainPCIAddressValidate(addrs, &tmp_addr,
|
||||
addrStr, flags, true))
|
||||
|
@ -1685,7 +1685,7 @@ virPCIGetAddrString(unsigned int domain,
|
||||
}
|
||||
|
||||
char *
|
||||
virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr)
|
||||
virPCIDeviceAddressAsString(virPCIDeviceAddressPtr addr)
|
||||
{
|
||||
char *str;
|
||||
|
||||
|
@ -225,7 +225,7 @@ int virPCIGetAddrString(unsigned int domain,
|
||||
char **pciConfigAddr)
|
||||
ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
|
||||
|
||||
char *virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr)
|
||||
char *virPCIDeviceAddressAsString(virPCIDeviceAddressPtr addr)
|
||||
ATTRIBUTE_NONNULL(1);
|
||||
|
||||
int virPCIDeviceAddressParse(char *address, virPCIDeviceAddressPtr bdf);
|
||||
|
Loading…
Reference in New Issue
Block a user