render / rpms / libvirt

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