render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
0a7476
From bb9521f7e0e8a67f04b5776cccf8b458a16bc94b Mon Sep 17 00:00:00 2001
0a7476
Message-Id: <bb9521f7e0e8a67f04b5776cccf8b458a16bc94b@dist-git>
0a7476
From: Michal Privoznik <mprivozn@redhat.com>
0a7476
Date: Thu, 18 Apr 2019 18:43:10 +0200
0a7476
Subject: [PATCH] conf: Expose virDomainSCSIDriveAddressIsUsed
0a7476
0a7476
https://bugzilla.redhat.com/show_bug.cgi?id=1692296
0a7476
0a7476
This function checks if given drive address is already present in
0a7476
passed domain definition. Expose the function as it will be used
0a7476
shortly.
0a7476
0a7476
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
0a7476
Tested-by: Daniel Henrique Barboza <danielhb413@gmail.com>
0a7476
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
0a7476
(cherry picked from commit 89237d534f0fe950d06a2081089154160c6c2224)
0a7476
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
0a7476
Message-Id: <79f85c93272ac232b81cb80f80d1ba396d557198.1555605741.git.mprivozn@redhat.com>
0a7476
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
0a7476
---
0a7476
 src/conf/domain_conf.c   | 2 +-
0a7476
 src/conf/domain_conf.h   | 4 ++++
0a7476
 src/libvirt_private.syms | 1 +
0a7476
 3 files changed, 6 insertions(+), 1 deletion(-)
0a7476
0a7476
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
0a7476
index 712efbb9f9..1096499831 100644
0a7476
--- a/src/conf/domain_conf.c
0a7476
+++ b/src/conf/domain_conf.c
0a7476
@@ -4400,7 +4400,7 @@ virDomainDriveAddressIsUsedByHostdev(const virDomainDef *def,
0a7476
  * Return true if the SCSI drive address is already in use, false
0a7476
  * otherwise.
0a7476
  */
0a7476
-static bool
0a7476
+bool
0a7476
 virDomainSCSIDriveAddressIsUsed(const virDomainDef *def,
0a7476
                                 const virDomainDeviceDriveAddress *addr)
0a7476
 {
0a7476
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
0a7476
index 5e2f21dea3..390bd81aa0 100644
0a7476
--- a/src/conf/domain_conf.h
0a7476
+++ b/src/conf/domain_conf.h
0a7476
@@ -2785,6 +2785,10 @@ virDomainXMLNamespacePtr
0a7476
 virDomainXMLOptionGetNamespace(virDomainXMLOptionPtr xmlopt)
0a7476
     ATTRIBUTE_NONNULL(1);
0a7476
 
0a7476
+bool
0a7476
+virDomainSCSIDriveAddressIsUsed(const virDomainDef *def,
0a7476
+                                const virDomainDeviceDriveAddress *addr);
0a7476
+
0a7476
 int virDomainDefPostParse(virDomainDefPtr def,
0a7476
                           virCapsPtr caps,
0a7476
                           unsigned int parseFlags,
0a7476
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
0a7476
index 3325b90535..3000d6ee0a 100644
0a7476
--- a/src/libvirt_private.syms
0a7476
+++ b/src/libvirt_private.syms
0a7476
@@ -520,6 +520,7 @@ virDomainRunningReasonTypeToString;
0a7476
 virDomainSaveConfig;
0a7476
 virDomainSaveStatus;
0a7476
 virDomainSaveXML;
0a7476
+virDomainSCSIDriveAddressIsUsed;
0a7476
 virDomainSeclabelTypeFromString;
0a7476
 virDomainSeclabelTypeToString;
0a7476
 virDomainShmemDefEquals;
0a7476
-- 
0a7476
2.21.0
0a7476