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
|
virErrorNumber errType = (fromConfig
|
||||||
? VIR_ERR_XML_ERROR : VIR_ERR_INTERNAL_ERROR);
|
? VIR_ERR_XML_ERROR : VIR_ERR_INTERNAL_ERROR);
|
||||||
|
|
||||||
if (!(addrStr = virDomainPCIAddressAsString(addr)))
|
if (!(addrStr = virPCIDeviceAddressAsString(addr)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
/* Add an extra bus if necessary */
|
/* Add an extra bus if necessary */
|
||||||
@ -689,7 +689,7 @@ virDomainPCIAddressEnsureAddr(virDomainPCIAddressSetPtr addrs,
|
|||||||
if (!flags)
|
if (!flags)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!(addrStr = virDomainPCIAddressAsString(&dev->addr.pci)))
|
if (!(addrStr = virPCIDeviceAddressAsString(&dev->addr.pci)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDeviceInfoPCIAddressIsPresent(dev)) {
|
if (virDeviceInfoPCIAddressIsPresent(dev)) {
|
||||||
@ -770,7 +770,7 @@ virDomainPCIAddressFindUnusedFunctionOnBus(virDomainPCIAddressBusPtr bus,
|
|||||||
|
|
||||||
*found = false;
|
*found = false;
|
||||||
|
|
||||||
if (!(addrStr = virDomainPCIAddressAsString(searchAddr)))
|
if (!(addrStr = virPCIDeviceAddressAsString(searchAddr)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!virDomainPCIAddressFlagsCompatible(searchAddr, addrStr, bus->flags,
|
if (!virDomainPCIAddressFlagsCompatible(searchAddr, addrStr, bus->flags,
|
||||||
|
@ -2496,7 +2496,7 @@ virObjectUnref;
|
|||||||
|
|
||||||
|
|
||||||
# util/virpci.h
|
# util/virpci.h
|
||||||
virDomainPCIAddressAsString;
|
virPCIDeviceAddressAsString;
|
||||||
virPCIDeviceAddressGetIOMMUGroupAddresses;
|
virPCIDeviceAddressGetIOMMUGroupAddresses;
|
||||||
virPCIDeviceAddressGetIOMMUGroupNum;
|
virPCIDeviceAddressGetIOMMUGroupNum;
|
||||||
virPCIDeviceAddressGetSysfsFile;
|
virPCIDeviceAddressGetSysfsFile;
|
||||||
|
@ -301,7 +301,7 @@ qemuBuildDeviceAddressStr(virBufferPtr buf,
|
|||||||
if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
|
if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (!(devStr = virDomainPCIAddressAsString(&info->addr.pci)))
|
if (!(devStr = virPCIDeviceAddressAsString(&info->addr.pci)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
for (i = 0; i < domainDef->ncontrollers; i++) {
|
for (i = 0; i < domainDef->ncontrollers; i++) {
|
||||||
virDomainControllerDefPtr cont = domainDef->controllers[i];
|
virDomainControllerDefPtr cont = domainDef->controllers[i];
|
||||||
|
@ -1306,7 +1306,7 @@ qemuDomainCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
|||||||
* inappropriate address types.
|
* inappropriate address types.
|
||||||
*/
|
*/
|
||||||
if (!info->pciConnectFlags) {
|
if (!info->pciConnectFlags) {
|
||||||
char *addrStr = virDomainPCIAddressAsString(&info->addr.pci);
|
char *addrStr = virPCIDeviceAddressAsString(&info->addr.pci);
|
||||||
|
|
||||||
VIR_WARN("qemuDomainDeviceCalculatePCIConnectFlags() thinks that the "
|
VIR_WARN("qemuDomainDeviceCalculatePCIConnectFlags() thinks that the "
|
||||||
"device with PCI address %s should not have a PCI address",
|
"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));
|
memset(&tmp_addr, 0, sizeof(tmp_addr));
|
||||||
tmp_addr.slot = 2;
|
tmp_addr.slot = 2;
|
||||||
|
|
||||||
if (!(addrStr = virDomainPCIAddressAsString(&tmp_addr)))
|
if (!(addrStr = virPCIDeviceAddressAsString(&tmp_addr)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (!virDomainPCIAddressValidate(addrs, &tmp_addr,
|
if (!virDomainPCIAddressValidate(addrs, &tmp_addr,
|
||||||
addrStr, flags, true))
|
addrStr, flags, true))
|
||||||
@ -1743,7 +1743,7 @@ qemuDomainValidateDevicePCISlotsQ35(virDomainDefPtr def,
|
|||||||
memset(&tmp_addr, 0, sizeof(tmp_addr));
|
memset(&tmp_addr, 0, sizeof(tmp_addr));
|
||||||
tmp_addr.slot = 1;
|
tmp_addr.slot = 1;
|
||||||
|
|
||||||
if (!(addrStr = virDomainPCIAddressAsString(&tmp_addr)))
|
if (!(addrStr = virPCIDeviceAddressAsString(&tmp_addr)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (!virDomainPCIAddressValidate(addrs, &tmp_addr,
|
if (!virDomainPCIAddressValidate(addrs, &tmp_addr,
|
||||||
addrStr, flags, true))
|
addrStr, flags, true))
|
||||||
|
@ -1685,7 +1685,7 @@ virPCIGetAddrString(unsigned int domain,
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr)
|
virPCIDeviceAddressAsString(virPCIDeviceAddressPtr addr)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ int virPCIGetAddrString(unsigned int domain,
|
|||||||
char **pciConfigAddr)
|
char **pciConfigAddr)
|
||||||
ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
|
ATTRIBUTE_NONNULL(5) ATTRIBUTE_RETURN_CHECK;
|
||||||
|
|
||||||
char *virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr)
|
char *virPCIDeviceAddressAsString(virPCIDeviceAddressPtr addr)
|
||||||
ATTRIBUTE_NONNULL(1);
|
ATTRIBUTE_NONNULL(1);
|
||||||
|
|
||||||
int virPCIDeviceAddressParse(char *address, virPCIDeviceAddressPtr bdf);
|
int virPCIDeviceAddressParse(char *address, virPCIDeviceAddressPtr bdf);
|
||||||
|
Loading…
Reference in New Issue
Block a user