From 2e3774564235a185a2cc4b7a22c17de17498db68 Mon Sep 17 00:00:00 2001 Message-Id: <2e3774564235a185a2cc4b7a22c17de17498db68@dist-git> From: Michal Privoznik Date: Thu, 18 Apr 2019 19:36:31 +0200 Subject: [PATCH] conf: Expose virDomainSCSIDriveAddressIsUsed RHEl-7.7: https://bugzilla.redhat.com/show_bug.cgi?id=1692296 RHEL-8.1.0: https://bugzilla.redhat.com/show_bug.cgi?id=1692354 This function checks if given drive address is already present in passed domain definition. Expose the function as it will be used shortly. Signed-off-by: Michal Privoznik Tested-by: Daniel Henrique Barboza Reviewed-by: Jim Fehlig (cherry picked from commit 89237d534f0fe950d06a2081089154160c6c2224) Signed-off-by: Michal Privoznik Message-Id: Reviewed-by: Jiri Denemark --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 4 ++++ src/libvirt_private.syms | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d431441f62..e62f78471c 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -4404,7 +4404,7 @@ virDomainDriveAddressIsUsedByHostdev(const virDomainDef *def, * Return true if the SCSI drive address is already in use, false * otherwise. */ -static bool +bool virDomainSCSIDriveAddressIsUsed(const virDomainDef *def, const virDomainDeviceDriveAddress *addr) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index f05fca284f..dbccf2cf24 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2789,6 +2789,10 @@ virDomainXMLNamespacePtr virDomainXMLOptionGetNamespace(virDomainXMLOptionPtr xmlopt) ATTRIBUTE_NONNULL(1); +bool +virDomainSCSIDriveAddressIsUsed(const virDomainDef *def, + const virDomainDeviceDriveAddress *addr); + int virDomainDefPostParse(virDomainDefPtr def, virCapsPtr caps, unsigned int parseFlags, diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 624151056a..df27ac4b3a 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -520,6 +520,7 @@ virDomainRunningReasonTypeToString; virDomainSaveConfig; virDomainSaveStatus; virDomainSaveXML; +virDomainSCSIDriveAddressIsUsed; virDomainSeclabelTypeFromString; virDomainSeclabelTypeToString; virDomainShmemDefEquals; -- 2.21.0