break;
}
diff --git a/src/hypervisor/domain_driver.h b/src/hypervisor/domain_driver.h
index 2bb053d559..86b92d0284 100644
--- a/src/hypervisor/domain_driver.h
+++ b/src/hypervisor/domain_driver.h
@@ -48,7 +48,4 @@ int virDomainDriverSetupPersistentDefBlkioParams(virDomainDefPtr persistentDef,
int nparams);
int virDomainDriverNodeDeviceGetPCIInfo(virNodeDeviceDefPtr def,
- unsigned *domain,
- unsigned *bus,
- unsigned *slot,
- unsigned *function);
+ virPCIDeviceAddressPtr devAddr);
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 0821d39c9b..360d553a22 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -5780,7 +5780,7 @@ libxlNodeDeviceDetachFlags(virNodeDevicePtr dev,
unsigned int flags)
{
virPCIDevicePtr pci = NULL;
- unsigned domain = 0, bus = 0, slot = 0, function = 0;
+ virPCIDeviceAddress devAddr;
int ret = -1;
virNodeDeviceDefPtr def = NULL;
char *xml = NULL;
@@ -5815,10 +5815,10 @@ libxlNodeDeviceDetachFlags(virNodeDevicePtr dev,
if (virNodeDeviceDetachFlagsEnsureACL(dev->conn, def) < 0)
goto cleanup;
- if (virDomainDriverNodeDeviceGetPCIInfo(def, &domain, &bus, &slot, &function) < 0)
+ if (virDomainDriverNodeDeviceGetPCIInfo(def, &devAddr) < 0)
goto cleanup;
- pci = virPCIDeviceNew(domain, bus, slot, function);
+ pci = virPCIDeviceNew(devAddr.domain, devAddr.bus, devAddr.slot, devAddr.function);
if (!pci)
goto cleanup;
@@ -5853,7 +5853,7 @@ static int
libxlNodeDeviceReAttach(virNodeDevicePtr dev)
{
virPCIDevicePtr pci = NULL;
- unsigned domain = 0, bus = 0, slot = 0, function = 0;
+ virPCIDeviceAddress devAddr;
int ret = -1;
virNodeDeviceDefPtr def = NULL;
char *xml = NULL;
@@ -5886,10 +5886,10 @@ libxlNodeDeviceReAttach(virNodeDevicePtr dev)
if (virNodeDeviceReAttachEnsureACL(dev->conn, def) < 0)
goto cleanup;
- if (virDomainDriverNodeDeviceGetPCIInfo(def, &domain, &bus, &slot, &function) < 0)
+ if (virDomainDriverNodeDeviceGetPCIInfo(def, &devAddr) < 0)
goto cleanup;
- pci = virPCIDeviceNew(domain, bus, slot, function);
+ pci = virPCIDeviceNew(devAddr.domain, devAddr.bus, devAddr.slot, devAddr.function);
if (!pci)
goto cleanup;
@@ -5911,7 +5911,7 @@ static int
libxlNodeDeviceReset(virNodeDevicePtr dev)
{
virPCIDevicePtr pci = NULL;
- unsigned domain = 0, bus = 0, slot = 0, function = 0;
+ virPCIDeviceAddress devAddr;
int ret = -1;
virNodeDeviceDefPtr def = NULL;
char *xml = NULL;
@@ -5944,10 +5944,10 @@ libxlNodeDeviceReset(virNodeDevicePtr dev)
if (virNodeDeviceResetEnsureACL(dev->conn, def) < 0)
goto cleanup;
- if (virDomainDriverNodeDeviceGetPCIInfo(def, &domain, &bus, &slot, &function) < 0)
+ if (virDomainDriverNodeDeviceGetPCIInfo(def, &devAddr) < 0)
goto cleanup;
- pci = virPCIDeviceNew(domain, bus, slot, function);
+ pci = virPCIDeviceNew(devAddr.domain, devAddr.bus, devAddr.slot, devAddr.function);
if (!pci)
goto cleanup;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0a732a241d..28781cc34b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11962,7 +11962,7 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev,
{
virQEMUDriverPtr driver = dev->conn->privateData;
virPCIDevicePtr pci = NULL;
- unsigned domain = 0, bus = 0, slot = 0, function = 0;
+ virPCIDeviceAddress devAddr;
int ret = -1;
virNodeDeviceDefPtr def = NULL;
g_autofree char *xml = NULL;
@@ -11997,10 +11997,10 @@ qemuNodeDeviceDetachFlags(virNodeDevicePtr dev,
if (virNodeDeviceDetachFlagsEnsureACL(dev->conn, def) < 0)
goto cleanup;
- if (virDomainDriverNodeDeviceGetPCIInfo(def, &domain, &bus, &slot, &function) < 0)
+ if (virDomainDriverNodeDeviceGetPCIInfo(def, &devAddr) < 0)
goto cleanup;
- pci = virPCIDeviceNew(domain, bus, slot, function);
+ pci = virPCIDeviceNew(devAddr.domain, devAddr.bus, devAddr.slot, devAddr.function);
if (!pci)
goto cleanup;
@@ -12046,7 +12046,7 @@ qemuNodeDeviceReAttach(virNodeDevicePtr dev)
{
virQEMUDriverPtr driver = dev->conn->privateData;
virPCIDevicePtr pci = NULL;
- unsigned domain = 0, bus = 0, slot = 0, function = 0;
+ virPCIDeviceAddress devAddr;
int ret = -1;
virNodeDeviceDefPtr def = NULL;
g_autofree char *xml = NULL;
@@ -12078,10 +12078,10 @@ qemuNodeDeviceReAttach(virNodeDevicePtr dev)
if (virNodeDeviceReAttachEnsureACL(dev->conn, def) < 0)
goto cleanup;
- if (virDomainDriverNodeDeviceGetPCIInfo(def, &domain, &bus, &slot, &function) < 0)
+ if (virDomainDriverNodeDeviceGetPCIInfo(def, &devAddr) < 0)
goto cleanup;
- pci = virPCIDeviceNew(domain, bus, slot, function);
+ pci = virPCIDeviceNew(devAddr.domain, devAddr.bus, devAddr.slot, devAddr.function);
if (!pci)
goto cleanup;
@@ -12100,7 +12100,7 @@ qemuNodeDeviceReset(virNodeDevicePtr dev)
{
virQEMUDriverPtr driver = dev->conn->privateData;
virPCIDevicePtr pci;
- unsigned domain = 0, bus = 0, slot = 0, function = 0;
+ virPCIDeviceAddress devAddr;
int ret = -1;
virNodeDeviceDefPtr def = NULL;
g_autofree char *xml = NULL;
@@ -12132,10 +12132,10 @@ qemuNodeDeviceReset(virNodeDevicePtr dev)
if (virNodeDeviceResetEnsureACL(dev->conn, def) < 0)
goto cleanup;
- if (virDomainDriverNodeDeviceGetPCIInfo(def, &domain, &bus, &slot, &function) < 0)
+ if (virDomainDriverNodeDeviceGetPCIInfo(def, &devAddr) < 0)
goto cleanup;
- pci = virPCIDeviceNew(domain, bus, slot, function);
+ pci = virPCIDeviceNew(devAddr.domain, devAddr.bus, devAddr.slot, devAddr.function);
if (!pci)
goto cleanup;