[PATCH v2 10/12] qemu: conf: Export qemuAddSharedDisk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In cases where we know the device is a disk we can avoid using the full
device definition.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 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 fc84186a7e..17b7e11e02 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -1400,7 +1400,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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux