diff --git a/src/bhyve/bhyve_device.c b/src/bhyve/bhyve_device.c index fe1c567be3..3eb2956580 100644 --- a/src/bhyve/bhyve_device.c +++ b/src/bhyve/bhyve_device.c @@ -40,7 +40,7 @@ bhyveCollectPCIAddress(virDomainDefPtr def ATTRIBUTE_UNUSED, { int ret = -1; virDomainPCIAddressSetPtr addrs = opaque; - virDevicePCIAddressPtr addr = &info->addr.pci; + virPCIDeviceAddressPtr addr = &info->addr.pci; if (addr->domain == 0 && addr->bus == 0) { if (addr->slot == 0) { @@ -88,7 +88,7 @@ bhyveAssignDevicePCISlots(virDomainDefPtr def, virDomainPCIAddressSetPtr addrs) { size_t i; - virDevicePCIAddress lpc_addr; + virPCIDeviceAddress lpc_addr; /* explicitly reserve slot 1 for LPC-ISA bridge */ memset(&lpc_addr, 0, sizeof(lpc_addr)); diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index 4e15d38463..9d9f6a7915 100644 --- a/src/conf/device_conf.c +++ b/src/conf/device_conf.c @@ -55,7 +55,7 @@ VIR_ENUM_IMPL(virNetDevFeature, "rdma", "txudptnl") -int virDevicePCIAddressIsValid(virDevicePCIAddressPtr addr, +int virPCIDeviceAddressIsValid(virPCIDeviceAddressPtr addr, bool report) { if (addr->domain > 0xFFFF) { @@ -102,8 +102,8 @@ int virDevicePCIAddressIsValid(virDevicePCIAddressPtr addr, int -virDevicePCIAddressParseXML(xmlNodePtr node, - virDevicePCIAddressPtr addr) +virPCIDeviceAddressParseXML(xmlNodePtr node, + virPCIDeviceAddressPtr addr) { char *domain, *slot, *bus, *function, *multi; int ret = -1; @@ -152,7 +152,7 @@ virDevicePCIAddressParseXML(xmlNodePtr node, goto cleanup; } - if (!virDevicePCIAddressIsValid(addr, true)) + if (!virPCIDeviceAddressIsValid(addr, true)) goto cleanup; ret = 0; @@ -167,8 +167,8 @@ virDevicePCIAddressParseXML(xmlNodePtr node, } int -virDevicePCIAddressFormat(virBufferPtr buf, - virDevicePCIAddress addr, +virPCIDeviceAddressFormat(virBufferPtr buf, + virPCIDeviceAddress addr, bool includeTypeInAddr) { virBufferAsprintf(buf, "
domain == addr2->domain && addr1->bus == addr2->bus && diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h index 85ce40f683..fc0f4abb36 100644 --- a/src/conf/device_conf.h +++ b/src/conf/device_conf.h @@ -31,6 +31,7 @@ # include "virutil.h" # include "virthread.h" # include "virbuffer.h" +# include "virpci.h" typedef enum { VIR_INTERFACE_STATE_UNKNOWN = 1, @@ -45,16 +46,6 @@ typedef enum { VIR_ENUM_DECL(virInterfaceState) -typedef struct _virDevicePCIAddress virDevicePCIAddress; -typedef virDevicePCIAddress *virDevicePCIAddressPtr; -struct _virDevicePCIAddress { - unsigned int domain; - unsigned int bus; - unsigned int slot; - unsigned int function; - int multi; /* virTristateSwitch */ -}; - typedef struct _virInterfaceLink virInterfaceLink; typedef virInterfaceLink *virInterfaceLinkPtr; struct _virInterfaceLink { @@ -81,18 +72,18 @@ typedef enum { VIR_ENUM_DECL(virNetDevFeature) -int virDevicePCIAddressIsValid(virDevicePCIAddressPtr addr, +int virPCIDeviceAddressIsValid(virPCIDeviceAddressPtr addr, bool report); -int virDevicePCIAddressParseXML(xmlNodePtr node, - virDevicePCIAddressPtr addr); +int virPCIDeviceAddressParseXML(xmlNodePtr node, + virPCIDeviceAddressPtr addr); -int virDevicePCIAddressFormat(virBufferPtr buf, - virDevicePCIAddress addr, +int virPCIDeviceAddressFormat(virBufferPtr buf, + virPCIDeviceAddress addr, bool includeTypeInAddr); -bool virDevicePCIAddressEqual(virDevicePCIAddress *addr1, - virDevicePCIAddress *addr2); +bool virPCIDeviceAddressEqual(virPCIDeviceAddress *addr1, + virPCIDeviceAddress *addr2); int virInterfaceLinkParseXML(xmlNodePtr node, virInterfaceLinkPtr lnk); diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index c0afa21e05..acd8ce6ed3 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -88,7 +88,7 @@ virDomainPCIControllerModelToConnectType(virDomainControllerModelPCI model) } bool -virDomainPCIAddressFlagsCompatible(virDevicePCIAddressPtr addr, +virDomainPCIAddressFlagsCompatible(virPCIDeviceAddressPtr addr, const char *addrStr, virDomainPCIConnectFlags busFlags, virDomainPCIConnectFlags devFlags, @@ -163,7 +163,7 @@ virDomainPCIAddressFlagsCompatible(virDevicePCIAddressPtr addr, */ bool virDomainPCIAddressValidate(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr, + virPCIDeviceAddressPtr addr, const char *addrStr, virDomainPCIConnectFlags flags, bool fromConfig) @@ -315,7 +315,7 @@ virDomainPCIAddressBusSetModel(virDomainPCIAddressBusPtr bus, */ int virDomainPCIAddressSetGrow(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr, + virPCIDeviceAddressPtr addr, virDomainPCIConnectFlags flags) { int add; @@ -351,7 +351,7 @@ virDomainPCIAddressSetGrow(virDomainPCIAddressSetPtr addrs, char * -virDomainPCIAddressAsString(virDevicePCIAddressPtr addr) +virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr) { char *str; @@ -369,7 +369,7 @@ virDomainPCIAddressAsString(virDevicePCIAddressPtr addr) */ bool virDomainPCIAddressSlotInUse(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr) + virPCIDeviceAddressPtr addr) { return !!addrs->buses[addr->bus].slots[addr->slot]; } @@ -386,7 +386,7 @@ virDomainPCIAddressSlotInUse(virDomainPCIAddressSetPtr addrs, */ int virDomainPCIAddressReserveAddr(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr, + virPCIDeviceAddressPtr addr, virDomainPCIConnectFlags flags, bool reserveEntireSlot, bool fromConfig) @@ -448,7 +448,7 @@ virDomainPCIAddressReserveAddr(virDomainPCIAddressSetPtr addrs, int virDomainPCIAddressReserveSlot(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr, + virPCIDeviceAddressPtr addr, virDomainPCIConnectFlags flags) { return virDomainPCIAddressReserveAddr(addrs, addr, flags, true, false); @@ -499,7 +499,7 @@ virDomainPCIAddressEnsureAddr(virDomainPCIAddressSetPtr addrs, int virDomainPCIAddressReleaseAddr(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr) + virPCIDeviceAddressPtr addr) { addrs->buses[addr->bus].slots[addr->slot] &= ~(1 << addr->function); return 0; @@ -507,7 +507,7 @@ virDomainPCIAddressReleaseAddr(virDomainPCIAddressSetPtr addrs, int virDomainPCIAddressReleaseSlot(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr) + virPCIDeviceAddressPtr addr) { /* permit any kind of connection type in validation, since we * already had it, and are giving it back. @@ -563,13 +563,13 @@ virDomainPCIAddressSetFree(virDomainPCIAddressSetPtr addrs) int virDomainPCIAddressGetNextSlot(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr next_addr, + virPCIDeviceAddressPtr next_addr, virDomainPCIConnectFlags flags) { /* default to starting the search for a free slot from * the first slot of domain 0 bus 0... */ - virDevicePCIAddress a = { 0, 0, 0, 0, false }; + virPCIDeviceAddress a = { 0, 0, 0, 0, false }; char *addrStr = NULL; if (addrs->nbuses == 0) { @@ -666,7 +666,7 @@ virDomainPCIAddressReserveNextSlot(virDomainPCIAddressSetPtr addrs, virDomainDeviceInfoPtr dev, virDomainPCIConnectFlags flags) { - virDevicePCIAddress addr; + virPCIDeviceAddress addr; if (virDomainPCIAddressGetNextSlot(addrs, &addr, flags) < 0) return -1; diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index 5b5de8a31c..f3eda89d5c 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -79,7 +79,7 @@ typedef virDomainPCIAddressBus *virDomainPCIAddressBusPtr; struct _virDomainPCIAddressSet { virDomainPCIAddressBus *buses; size_t nbuses; - virDevicePCIAddress lastaddr; + virPCIDeviceAddress lastaddr; virDomainPCIConnectFlags lastFlags; bool dryRun; /* on a dry run, new buses are auto-added and addresses aren't saved in device infos */ @@ -87,14 +87,14 @@ struct _virDomainPCIAddressSet { typedef struct _virDomainPCIAddressSet virDomainPCIAddressSet; typedef virDomainPCIAddressSet *virDomainPCIAddressSetPtr; -char *virDomainPCIAddressAsString(virDevicePCIAddressPtr addr) +char *virDomainPCIAddressAsString(virPCIDeviceAddressPtr addr) ATTRIBUTE_NONNULL(1); virDomainPCIAddressSetPtr virDomainPCIAddressSetAlloc(unsigned int nbuses); void virDomainPCIAddressSetFree(virDomainPCIAddressSetPtr addrs); -bool virDomainPCIAddressFlagsCompatible(virDevicePCIAddressPtr addr, +bool virDomainPCIAddressFlagsCompatible(virPCIDeviceAddressPtr addr, const char *addrStr, virDomainPCIConnectFlags busFlags, virDomainPCIConnectFlags devFlags, @@ -103,7 +103,7 @@ bool virDomainPCIAddressFlagsCompatible(virDevicePCIAddressPtr addr, ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); bool virDomainPCIAddressValidate(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr, + virPCIDeviceAddressPtr addr, const char *addrStr, virDomainPCIConnectFlags flags, bool fromConfig) @@ -115,23 +115,23 @@ int virDomainPCIAddressBusSetModel(virDomainPCIAddressBusPtr bus, ATTRIBUTE_NONNULL(1); bool virDomainPCIAddressSlotInUse(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr) + virPCIDeviceAddressPtr addr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int virDomainPCIAddressSetGrow(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr, + virPCIDeviceAddressPtr addr, virDomainPCIConnectFlags flags) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int virDomainPCIAddressReserveAddr(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr, + virPCIDeviceAddressPtr addr, virDomainPCIConnectFlags flags, bool reserveEntireSlot, bool fromConfig) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int virDomainPCIAddressReserveSlot(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr, + virPCIDeviceAddressPtr addr, virDomainPCIConnectFlags flags) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); @@ -140,15 +140,15 @@ int virDomainPCIAddressEnsureAddr(virDomainPCIAddressSetPtr addrs, ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int virDomainPCIAddressReleaseAddr(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr) + virPCIDeviceAddressPtr addr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int virDomainPCIAddressReleaseSlot(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr addr) + virPCIDeviceAddressPtr addr) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); int virDomainPCIAddressGetNextSlot(virDomainPCIAddressSetPtr addrs, - virDevicePCIAddressPtr next_addr, + virPCIDeviceAddressPtr next_addr, virDomainPCIConnectFlags flags) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2); diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 23ff887129..4853f74189 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -3113,7 +3113,7 @@ int virDomainDeviceAddressIsValid(virDomainDeviceInfoPtr info, switch (info->type) { case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: - return virDevicePCIAddressIsValid(&info->addr.pci, false); + return virPCIDeviceAddressIsValid(&info->addr.pci, false); case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE: return 1; @@ -5043,7 +5043,7 @@ virDomainDeviceInfoParseXML(xmlNodePtr node, switch ((virDomainDeviceAddressType) info->type) { case VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI: - if (virDevicePCIAddressParseXML(address, &info->addr.pci) < 0) + if (virPCIDeviceAddressParseXML(address, &info->addr.pci) < 0) goto cleanup; break; @@ -5113,7 +5113,7 @@ virDomainDeviceInfoParseXML(xmlNodePtr node, static int virDomainParseLegacyDeviceAddress(char *devaddr, - virDevicePCIAddressPtr pci) + virPCIDeviceAddressPtr pci) { char *tmp; @@ -5317,10 +5317,10 @@ virDomainHostdevSubsysPCIDefParseXML(xmlNodePtr node, while (cur != NULL) { if (cur->type == XML_ELEMENT_NODE) { if (xmlStrEqual(cur->name, BAD_CAST "address")) { - virDevicePCIAddressPtr addr = + virPCIDeviceAddressPtr addr = &def->source.subsys.u.pci.addr; - if (virDevicePCIAddressParseXML(cur, addr) < 0) + if (virPCIDeviceAddressParseXML(cur, addr) < 0) goto out; } else if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) && xmlStrEqual(cur->name, BAD_CAST "state")) { @@ -13263,7 +13263,7 @@ virDomainDiskControllerMatch(int controller_type, int disk_bus) int virDomainDiskIndexByAddress(virDomainDefPtr def, - virDevicePCIAddressPtr pci_address, + virPCIDeviceAddressPtr pci_address, unsigned int bus, unsigned int target, unsigned int unit) { @@ -13278,7 +13278,7 @@ virDomainDiskIndexByAddress(virDomainDefPtr def, for (i = 0; i < def->ndisks; i++) { vdisk = def->disks[i]; if (vdisk->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI && - virDevicePCIAddressEqual(&vdisk->info.addr.pci, pci_address)) + virPCIDeviceAddressEqual(&vdisk->info.addr.pci, pci_address)) return i; if (vdisk->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE) { virDomainDeviceDriveAddressPtr drive = &vdisk->info.addr.drive; @@ -13295,7 +13295,7 @@ virDomainDiskIndexByAddress(virDomainDefPtr def, virDomainDiskDefPtr virDomainDiskByAddress(virDomainDefPtr def, - virDevicePCIAddressPtr pci_address, + virPCIDeviceAddressPtr pci_address, unsigned int bus, unsigned int target, unsigned int unit) @@ -13465,7 +13465,7 @@ virDomainNetFindIdx(virDomainDefPtr def, virDomainNetDefPtr net) return -1; } if (PCIAddrSpecified) { - if (virDevicePCIAddressEqual(&def->nets[i]->info.addr.pci, + if (virPCIDeviceAddressEqual(&def->nets[i]->info.addr.pci, &net->info.addr.pci)) { /* exit early if the pci address was specified and * it matches, as this guarantees no duplicates. @@ -13509,7 +13509,7 @@ virDomainHasNet(virDomainDefPtr def, virDomainNetDefPtr net) continue; if (PCIAddrSpecified) { - if (virDevicePCIAddressEqual(&def->nets[i]->info.addr.pci, + if (virPCIDeviceAddressEqual(&def->nets[i]->info.addr.pci, &net->info.addr.pci)) return true; } else { @@ -13686,7 +13686,7 @@ virDomainControllerFindByType(virDomainDefPtr def, int virDomainControllerFindByPCIAddress(virDomainDefPtr def, - virDevicePCIAddressPtr addr) + virPCIDeviceAddressPtr addr) { size_t i; @@ -13694,7 +13694,7 @@ virDomainControllerFindByPCIAddress(virDomainDefPtr def, virDomainDeviceInfoPtr info = &def->controllers[i]->info; if (info->type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI && - virDevicePCIAddressEqual(&info->addr.pci, addr)) + virPCIDeviceAddressEqual(&info->addr.pci, addr)) return i; } @@ -19747,7 +19747,7 @@ virDomainHostdevDefFormatSubsys(virBufferPtr buf, } break; case VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI: - if (virDevicePCIAddressFormat(buf, pcisrc->addr, + if (virPCIDeviceAddressFormat(buf, pcisrc->addr, includeTypeInAddr) != 0) virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("PCI address Formatting failed")); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index b9fe109562..2cb9fa305d 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -348,7 +348,7 @@ struct _virDomainDeviceInfo { char *alias; int type; /* virDomainDeviceAddressType */ union { - virDevicePCIAddress pci; + virPCIDeviceAddress pci; virDomainDeviceDriveAddress drive; virDomainDeviceVirtioSerialAddress vioserial; virDomainDeviceCcidAddress ccid; @@ -456,7 +456,7 @@ struct _virDomainHostdevSubsysUSB { typedef struct _virDomainHostdevSubsysPCI virDomainHostdevSubsysPCI; typedef virDomainHostdevSubsysPCI *virDomainHostdevSubsysPCIPtr; struct _virDomainHostdevSubsysPCI { - virDevicePCIAddress addr; /* host address */ + virPCIDeviceAddress addr; /* host address */ int backend; /* enum virDomainHostdevSubsysPCIBackendType */ }; @@ -2780,11 +2780,11 @@ int virDomainDefCompatibleDevice(virDomainDefPtr def, void virDomainRNGDefFree(virDomainRNGDefPtr def); int virDomainDiskIndexByAddress(virDomainDefPtr def, - virDevicePCIAddressPtr pci_controller, + virPCIDeviceAddressPtr pci_controller, unsigned int bus, unsigned int target, unsigned int unit); virDomainDiskDefPtr virDomainDiskByAddress(virDomainDefPtr def, - virDevicePCIAddressPtr pci_controller, + virPCIDeviceAddressPtr pci_controller, unsigned int bus, unsigned int target, unsigned int unit); @@ -2855,7 +2855,7 @@ void virDomainControllerInsertPreAlloced(virDomainDefPtr def, int virDomainControllerFind(const virDomainDef *def, int type, int idx); int virDomainControllerFindByType(virDomainDefPtr def, int type); int virDomainControllerFindByPCIAddress(virDomainDefPtr def, - virDevicePCIAddressPtr addr); + virPCIDeviceAddressPtr addr); virDomainControllerDefPtr virDomainControllerRemove(virDomainDefPtr def, size_t i); const char *virDomainControllerAliasFind(const virDomainDef *def, int type, int idx) diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index e6915ffde7..c574b01b71 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -1974,13 +1974,13 @@ virNetworkForwardDefParseXML(const char *networkName, switch (def->ifs[i].type) { case VIR_NETWORK_FORWARD_HOSTDEV_DEVICE_PCI: { - virDevicePCIAddressPtr addr = &def->ifs[i].device.pci; + virPCIDeviceAddressPtr addr = &def->ifs[i].device.pci; - if (virDevicePCIAddressParseXML(forwardAddrNodes[i], addr) < 0) + if (virPCIDeviceAddressParseXML(forwardAddrNodes[i], addr) < 0) goto cleanup; for (j = 0; j < i; j++) { - if (virDevicePCIAddressEqual(addr, &def->ifs[j].device.pci)) { + if (virPCIDeviceAddressEqual(addr, &def->ifs[j].device.pci)) { virReportError(VIR_ERR_XML_ERROR, _("PCI device '%04x:%02x:%02x.%x' can " "only be listed once in network %s"), @@ -2797,7 +2797,7 @@ virNetworkDefFormatBuf(virBufferPtr buf, virBufferAddLit(buf, "/>\n"); } else { if (def->forward.ifs[i].type == VIR_NETWORK_FORWARD_HOSTDEV_DEVICE_PCI) { - if (virDevicePCIAddressFormat(buf, + if (virPCIDeviceAddressFormat(buf, def->forward.ifs[i].device.pci, true) < 0) goto error; diff --git a/src/conf/network_conf.h b/src/conf/network_conf.h index b72257b970..0d34dfe626 100644 --- a/src/conf/network_conf.h +++ b/src/conf/network_conf.h @@ -169,7 +169,7 @@ typedef virNetworkForwardIfDef *virNetworkForwardIfDefPtr; struct _virNetworkForwardIfDef { int type; union { - virDevicePCIAddress pci; /*PCI Address of device */ + virPCIDeviceAddress pci; /*PCI Address of device */ /* when USB devices are supported a new variable to be added here */ char *dev; /* name of device */ }device; diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index a76f785edd..e7e4bbd390 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -1164,8 +1164,8 @@ virNodeDevCapPCIDevIommuGroupParseXML(xmlXPathContextPtr ctxt, goto cleanup; for (i = 0; i < nAddrNodes; i++) { - virDevicePCIAddress addr = { 0, 0, 0, 0, 0 }; - if (virDevicePCIAddressParseXML(addrNodes[i], &addr) < 0) + virPCIDeviceAddress addr = { 0, 0, 0, 0, 0 }; + if (virPCIDeviceAddressParseXML(addrNodes[i], &addr) < 0) goto cleanup; if (VIR_ALLOC(pciAddr) < 0) goto cleanup; diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index daf8f99285..3c83226912 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -603,7 +603,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt, if (virXPathNode("./adapter/parentaddr", ctxt)) { xmlNodePtr addrnode = virXPathNode("./adapter/parentaddr/address", ctxt); - virDevicePCIAddressPtr addr = + virPCIDeviceAddressPtr addr = &source->adapter.data.scsi_host.parentaddr; if (!addrnode) { @@ -612,7 +612,7 @@ virStoragePoolDefParseSource(xmlXPathContextPtr ctxt, goto cleanup; } source->adapter.data.scsi_host.has_parent = true; - if (virDevicePCIAddressParseXML(addrnode, addr) < 0) + if (virPCIDeviceAddressParseXML(addrnode, addr) < 0) goto cleanup; if ((virXPathInt("string(./adapter/parentaddr/@unique_id)", ctxt, @@ -1103,14 +1103,14 @@ virStoragePoolSourceFormat(virBufferPtr buf, virBufferAsprintf(buf, " name='%s'/>\n", src->adapter.data.scsi_host.name); } else { - virDevicePCIAddress addr; + virPCIDeviceAddress addr; virBufferAddLit(buf, ">\n"); virBufferAdjustIndent(buf, 2); virBufferAsprintf(buf, "