Change and rename the static set_rasd_device_address() to a global
set_device_address() which can be shared with Virt_Device.c to handle
controller addresses.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/Virt_RASD.c | 21 +++++++++------------
src/Virt_RASD.h | 4 ++++
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/src/Virt_RASD.c b/src/Virt_RASD.c
index df1e921..a06714e 100644
--- a/src/Virt_RASD.c
+++ b/src/Virt_RASD.c
@@ -289,10 +289,9 @@ static bool get_vol_size(const CMPIBroker *broker,
}
#endif
-static CMPIStatus set_rasd_device_address(const CMPIBroker *broker,
- const CMPIObjectPath *ref,
- const struct device_address *addr,
- CMPIInstance *inst)
+CMPIStatus set_device_address(const CMPIBroker *broker,
+ const struct device_address *addr,
+ CMPIInstance *inst)
{
int i;
CMPIArray *arr_key;
@@ -489,10 +488,9 @@ static CMPIStatus set_disk_rasd_params(const CMPIBroker *broker,
CMPI_boolean);
if (dev->dev.disk.address.ct > 0)
- set_rasd_device_address(broker,
- ref,
- &dev->dev.disk.address,
- inst);
+ set_device_address(broker,
+ &dev->dev.disk.address,
+ inst);
virStoragePoolFree(pool);
virStorageVolFree(vol);
@@ -658,10 +656,9 @@ static CMPIStatus set_net_rasd_params(const CMPIBroker *broker,
CMPI_chars);
if (dev->dev.net.address.ct > 0)
- set_rasd_device_address(broker,
- ref,
- &dev->dev.net.address,
- inst);
+ set_device_address(broker,
+ &dev->dev.net.address,
+ inst);
#if LIBVIR_VERSION_NUMBER < 9000
out:
diff --git a/src/Virt_RASD.h b/src/Virt_RASD.h
index 400143f..c96cf43 100644
--- a/src/Virt_RASD.h
+++ b/src/Virt_RASD.h
@@ -69,6 +69,10 @@ int list_rasds(virConnectPtr conn,
const char *host,
struct virt_device **list);
+CMPIStatus set_device_address(const CMPIBroker *broker,
+ const struct device_address *addr,
+ CMPIInstance *inst);
+
CMPIInstance *rasd_from_vdev(const CMPIBroker *broker,
struct virt_device *dev,
const char *host,
--
1.8.5.3