In cases where we know the device is a disk we can avoid using the full
device definition.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_conf.c | 2 +-
src/qemu/qemu_conf.h | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 33508174cb..6cdc0f407a 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1411,7 +1411,7 @@ qemuSharedDeviceEntryInsert(virQEMUDriverPtr driver,
* records all the domains that use the shared device if the entry
* already exists, otherwise add a new entry.
*/
-static int
+int
qemuAddSharedDisk(virQEMUDriverPtr driver,
virDomainDiskDefPtr disk,
const char *name)
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index c227ac72cc..f876f9117c 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -339,6 +339,11 @@ char *qemuGetSharedDeviceKey(const char *disk_path)
void qemuSharedDeviceEntryFree(void *payload, const void *name);
+int qemuAddSharedDisk(virQEMUDriverPtr driver,
+ virDomainDiskDefPtr disk,
+ const char *name)
+ ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
+
int qemuAddSharedDevice(virQEMUDriverPtr driver,
virDomainDeviceDefPtr dev,
const char *name)
--
2.17.1